/* Primary Color Client Portal — design system pulled from the VDP intake
   reference: warm cream ground, heavy condensed display type, an elegant
   serif for body copy, brand-color eyebrow dots, and pill-shaped tags. */

:root {
  --pc-navy: #015696;
  --pc-red: #C42032;
  --pc-gold: #FFD600;
  --pc-green: #8BC43F;
  --pc-ink: #1A1A1A;
  --pc-cream: #F7F4EC;
  --pc-panel: #FFFFFF;
  --pc-line: #E4DFD1;
  --pc-muted: #6E685A;
  --pc-tint: #EFEADA;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: var(--pc-ink);
  background: var(--pc-cream);
  line-height: 1.55;
}

a { color: var(--pc-navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Display / heading type — heavy, condensed, black */
h1, h2, h3, .display {
  font-family: 'Archivo', 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  color: var(--pc-ink);
}

/* Small tracked labels / UI chrome */
.label, label, th, .eyebrow, .btn, .pill, .badge {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Eyebrow (4-dot brand marker + tracked label) ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.eyebrow .dots { display: flex; gap: 5px; }
.eyebrow .dots span {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.eyebrow .dots span:nth-child(1) { background: var(--pc-red); }
.eyebrow .dots span:nth-child(2) { background: var(--pc-navy); }
.eyebrow .dots span:nth-child(3) { background: var(--pc-gold); }
.eyebrow .dots span:nth-child(4) { background: var(--pc-green); }
.eyebrow .text {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pc-red);
}

/* Four-segment brand color divider bar */
.brand-divider {
  display: flex;
  height: 4px;
  width: 220px;
  border-radius: 2px;
  overflow: hidden;
  margin: 18px 0 0;
}
.brand-divider span { flex: 1; }
.brand-divider span:nth-child(1) { background: var(--pc-red); }
.brand-divider span:nth-child(2) { background: var(--pc-navy); }
.brand-divider span:nth-child(3) { background: var(--pc-gold); }
.brand-divider span:nth-child(4) { background: var(--pc-green); }

/* ---------- Topbar ---------- */

.topbar {
  background: var(--pc-cream);
  border-bottom: 1px solid var(--pc-line);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pc-ink);
}
.brand-lockup { width: 238px; height: 68px; display: block; }

.topnav { display: flex; align-items: center; gap: 22px; }
.topnav a {
  color: var(--pc-ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topnav a:hover { color: var(--pc-navy); text-decoration: none; }
/* Menu items never break onto two lines (an unread badge used to push
   "Activity" and "Log out" into two-line stacks on iPad). */
.topnav a, .topnav .link-button, .nav-dropdown summary { white-space: nowrap; }

/* ---------- Admin dropdown (collapses Team / Password Resets / User Activity) ---------- */

.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  color: var(--pc-ink);
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after {
  content: '';
  width: 6px; height: 6px;
  border-right: 1.5px solid var(--pc-muted);
  border-bottom: 1.5px solid var(--pc-muted);
  transform: rotate(45deg);
  margin-top: -3px;
}
.nav-dropdown:hover summary, .nav-dropdown[open] summary { color: var(--pc-navy); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(26,26,26,0.12);
  min-width: 190px;
  padding: 6px;
  z-index: 40;
}
.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--pc-tint); text-decoration: none; }

/* Closes the dropdown when a click lands elsewhere on the page */
.nav-dropdown[open] summary { }

/* ---------- Mobile nav toggle ---------- */

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px; height: 34px;
  background: none;
  border: 1px solid var(--pc-line);
  border-radius: 6px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--pc-ink); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .topnav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--pc-cream);
    border-bottom: 1px solid var(--pc-line);
    padding: 10px 24px 18px;
    /* Was rendering with no z-index, so the hero section's z-index: 1
       content (see .hero > .page-header below) painted on top of this
       open dropdown instead of behind it — nav links, the company pill,
       avatar, and Log out all bled visually into the hero heading. */
    z-index: 200;
    box-shadow: 0 12px 24px rgba(26,26,26,0.12);
  }
  .topnav.is-open { display: flex; }
  .topnav a, .nav-dropdown summary { padding: 8px 0; width: 100%; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 12px; margin-top: 2px; }
  .topbar-inner { position: relative; flex-wrap: wrap; z-index: 201; }
}

/* The admin menu is the longest (seven items plus badges), so it switches
   to the menu button below 1100px, which covers iPads held sideways.
   Same rules as the block above; client and partner menus still fit. */
@media (min-width: 861px) and (max-width: 1100px) {
  .topbar-admin .nav-toggle { display: flex; }
  .topbar-admin .topnav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--pc-cream);
    border-bottom: 1px solid var(--pc-line);
    padding: 10px 24px 18px;
    z-index: 200;
    box-shadow: 0 12px 24px rgba(26,26,26,0.12);
  }
  .topbar-admin .topnav.is-open { display: flex; }
  .topbar-admin .topnav a, .topbar-admin .nav-dropdown summary { padding: 8px 0; width: 100%; }
  .topbar-admin .nav-dropdown { width: 100%; }
  .topbar-admin .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 12px; margin-top: 2px; }
  .topbar-admin .topbar-inner { position: relative; flex-wrap: wrap; z-index: 201; }
}

.logout-form { margin: 0; }
.link-button {
  background: none; border: none; color: var(--pc-ink); opacity: 0.7;
  font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0;
}
.link-button:hover { opacity: 1; text-decoration: underline; }

/* ---------- Pills (role badges, status tags) ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pill-dark { background: var(--pc-ink); color: #fff; }
.pill-outline { background: var(--pc-cream); color: var(--pc-navy); border: 1.5px solid var(--pc-navy); }
.pill-navy { background: var(--pc-navy); color: #fff; }
.pill-green { background: var(--pc-green); color: #24390f; }
.pill-gold { background: var(--pc-gold); color: #5c4300; }
.pill-red { background: var(--pc-red); color: #fff; }

/* ---------- Avatars (photo or initials fallback) ---------- */

.avatar-link { display: inline-flex; align-items: center; }
.avatar-img,
.avatar-initials {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
}
.avatar-img { object-fit: cover; border: 1px solid var(--pc-line); }
.avatar-initials {
  color: #fff;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  user-select: none;
}

/* ---------- Layout ---------- */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

/* The VDP quote builder renders itself for a ~1800px-wide desktop layout
   (a 1440px build view plus its own 330px running-total rail) — the
   default .page width above would clip it. Used only on that page. */
.page-wide {
  max-width: 1900px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

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

.page-header h1 { font-size: 34px; text-transform: uppercase; }
.page-header .accent { color: var(--pc-red); }
.page-header p { color: var(--pc-muted); margin: 10px 0 0; font-size: 16px; max-width: 640px; }

/* ---------- Background watermark (oversized faint logo, like the site) ---------- */

.hero {
  position: relative;
  overflow: hidden;
}
.hero .bg-mark {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 420px;
  height: 420px;
  object-fit: contain;
  opacity: 0.06;
  transform: rotate(8deg);
  pointer-events: none;
  z-index: 0;
}
.hero > .page-header,
.hero > .login-card-inner {
  position: relative;
  z-index: 1;
}

/* ---------- Callout (info/instruction box) ---------- */

.callout {
  background: var(--pc-tint);
  border-left: 4px solid var(--pc-red);
  border-radius: 4px;
  padding: 18px 22px;
  margin-bottom: 24px;
  font-size: 15px;
}
.callout strong { font-family: 'Archivo', sans-serif; font-weight: 700; }
.callout.callout-green { border-left-color: var(--pc-green); }

/* ---------- Cards / sections ---------- */

.card {
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  padding: 22px;
}
.card + .card { margin-top: 18px; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--pc-line);
}
.section-title h2 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.03em; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}

.project-card {
  display: block;
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.project-card:hover { border-color: var(--pc-ink); text-decoration: none; transform: translateY(-1px); }
.project-card h3 {
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  text-transform: none;
  margin-bottom: 8px;
}
.project-card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-active { background: rgba(139,196,63,0.22); color: #3d611a; }
.badge-on-hold { background: rgba(255,196,40,0.3); color: #6b4f00; }
.badge-completed { background: rgba(1,86,150,0.15); color: var(--pc-navy); }
.badge-archived { background: rgba(110,104,90,0.18); color: var(--pc-muted); }

.badge-count { background: var(--pc-red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 3px 10px; }

/* ---------- Tables ---------- */

table { width: 100%; border-collapse: collapse; font-family: 'Archivo', sans-serif; font-size: 14px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--pc-line); }
th { color: var(--pc-muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Forms ---------- */

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-ink);
  margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], input[type=date], input[type=file], textarea, select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--pc-line);
  border-radius: 5px;
  font-family: 'Lora', serif;
  font-size: 15px;
  margin-bottom: 16px;
  background: var(--pc-panel);
  color: var(--pc-ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--pc-navy); }
textarea { resize: vertical; min-height: 76px; }

.btn {
  display: inline-block;
  background: var(--pc-ink);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 5px;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { background: #000; text-decoration: none; }
.btn-secondary { background: var(--pc-navy); }
.btn-secondary:hover { background: #05437a; }
.btn-danger { background: var(--pc-red); }
.btn-danger:hover { background: #a11a29; }
.btn-small { padding: 7px 14px; font-size: 11px; }

.inline-form { display: inline; }

/* ---------- Login ---------- */

.login-wrap {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  padding: 36px;
}
.login-card h1 { font-size: 28px; text-transform: uppercase; margin-bottom: 4px; }
.login-card .sub { font-family: 'Lora', serif; color: var(--pc-muted); font-size: 15px; margin-bottom: 22px; }
.error-message {
  color: #7a1420; background: rgba(198,33,50,0.08);
  border-left: 3px solid var(--pc-red);
  padding: 10px 14px; font-size: 14px; margin-bottom: 16px; border-radius: 3px;
  font-family: 'Archivo', sans-serif;
}

/* ---------- Task list ---------- */

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--pc-line);
}
.task-row:last-child { border-bottom: none; }
.task-row.done .task-title { text-decoration: line-through; color: var(--pc-muted); }
.task-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; }
.task-meta { font-family: 'Lora', serif; font-size: 13px; color: var(--pc-muted); margin-top: 3px; }
.task-due { color: var(--pc-red); font-weight: 700; font-family: 'Archivo', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
.task-attachment { font-size: 13px; margin-top: 4px; }

/* ---------- Contact cards ---------- */

.contact-card { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--pc-line); }
.contact-card:last-child { border-bottom: none; }
.contact-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pc-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 16px; flex-shrink: 0;
  object-fit: cover;
}
.contact-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; }
.contact-title { font-size: 12px; color: var(--pc-muted); font-family: 'Archivo', sans-serif; }
.contact-info { font-size: 13px; margin-top: 3px; font-family: 'Archivo', sans-serif; }

/* ---------- Misc ---------- */

.empty-state { color: var(--pc-muted); font-style: italic; padding: 22px 0; text-align: center; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
  .page-header h1 { font-size: 26px; }
  .dash-header h1 { font-size: 24px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat-number { font-family: 'Archivo Black', sans-serif; font-size: 36px; color: var(--pc-navy); }
.stat-label { font-family: 'Archivo', sans-serif; font-size: 11px; color: var(--pc-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

.checkbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 8px; margin-bottom: 16px; }
.checkbox-list label {
  display: flex; align-items: center; gap: 7px;
  font-weight: 500; text-transform: none; letter-spacing: normal;
  font-family: 'Archivo', sans-serif; font-size: 14px;
}
.checkbox-list input { width: auto; margin: 0; }

.file-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pc-line); font-family: 'Archivo', sans-serif; font-size: 14px; }
.file-row:last-child { border-bottom: none; }
.file-row .btn { flex-shrink: 0; }
.file-row .file-info { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.file-row .file-name { word-break: break-word; line-height: 1.35; padding-top: 6px; }
.file-type-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: 0.02em;
}

/* ---------- Expandable project accordion (client dashboard) ---------- */

.project-accordion {
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.project-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}
.project-summary::-webkit-details-marker { display: none; }
.project-summary .left { display: flex; align-items: center; gap: 14px; }
.project-summary h3 {
  font-family: 'Archivo', sans-serif;
  font-size: 17px;
  text-transform: none;
  margin: 0;
}
.project-summary .chevron {
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  color: var(--pc-muted);
  transition: transform 0.15s;
}
.project-accordion[open] .project-summary .chevron { transform: rotate(90deg); }
.project-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--pc-line);
}
.project-body .sub-section { margin-top: 20px; }
.project-body .sub-section:first-child { margin-top: 20px; }
.project-body .sub-heading {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  color: var(--pc-ink);
}


/* ==========================================================================
   Portal update — front door, client dashboard, admin project page
   Added on top of the existing system; no variables or base styles changed.
   ========================================================================== */

/* ---------- Buttons: quiet + outline variants ---------- */

.btn-outline {
  background: var(--pc-panel);
  color: var(--pc-ink);
  border: 1.5px solid var(--pc-ink);
}
.btn-outline:hover { background: var(--pc-ink); color: #fff; }
.btn-quiet {
  background: var(--pc-panel);
  color: var(--pc-ink);
  border: 1.5px solid var(--pc-line);
}
.btn-quiet:hover { background: var(--pc-tint); border-color: var(--pc-muted); }

/* ---------- Front door (login page) ---------- */

.frontdoor {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(100vh - 78px);
}
.frontdoor-story { position: relative; overflow: hidden; padding: 56px 48px; }
.frontdoor-story-inner { position: relative; z-index: 1; max-width: 620px; }
.frontdoor-mark {
  top: -70px;
  left: -80px;
  right: auto;
  width: 460px;
  height: 460px;
  transform: rotate(-8deg);
}
.frontdoor-headline {
  font-size: 50px;
  line-height: 1.0;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  max-width: 16ch;
  margin-bottom: 18px;
}
.frontdoor-lede {
  font-size: 17px;
  line-height: 1.6;
  color: #4A4438;
  margin: 0 0 36px;
  max-width: 46ch;
  text-wrap: pretty;
}

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; }
.step-bar { height: 4px; width: 46px; border-radius: 2px; margin-bottom: 12px; }
.step h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 7px;
}
.step p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--pc-muted); }

.frontdoor-login {
  background: var(--pc-panel);
  border-left: 1px solid var(--pc-line);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.frontdoor-login-title { font-size: 26px; text-transform: uppercase; margin-bottom: 4px; }
.frontdoor-login .sub { font-family: 'Lora', serif; color: var(--pc-muted); font-size: 15px; margin: 0 0 26px; }
.frontdoor-forgot { margin: 14px 0 0; font-family: 'Archivo', sans-serif; font-size: 13px; }

.access-block { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--pc-line); }
.access-label {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-muted);
  margin-bottom: 14px;
}
.contact-mini { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.contact-mini img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.access-copy { font-size: 14px; color: #4A4438; margin: 0 0 16px; line-height: 1.55; }

@media (max-width: 940px) {
  .frontdoor { grid-template-columns: 1fr; }
  .frontdoor-login { border-left: none; border-top: 1px solid var(--pc-line); }
  .frontdoor-headline { font-size: 38px; }
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Dashboard shell ---------- */

.dash-header { align-items: flex-end; }
.dash-header h1 { font-size: 30px; text-transform: uppercase; margin: 0; }

.dash-grid { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 18px; }
.dash-main .card + .card { margin-top: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; }
.dash-side .card + .card { margin-top: 0; }
@media (max-width: 940px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pc-line);
}
.dash-section-note { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); }

/* ---------- "Needs you" band ---------- */

.attention-card {
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-top: 4px solid var(--pc-red);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 22px;
}
.attention-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.attention-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.attention-note { font-size: 13px; color: var(--pc-muted); font-style: italic; }
.attention-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--pc-line);
}
.attention-row:last-child { border-bottom: none; }
.attention-row .inline-form { display: flex; }
.attention-row input[type=checkbox] { width: 18px; height: 18px; margin: 0; }
.attention-body { flex: 1; min-width: 0; }
.attention-due {
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pc-muted);
  white-space: nowrap;
}
.attention-due.is-late { color: var(--pc-red); }

/* ---------- Project panel + milestone strip ---------- */

.project-panel { padding: 20px 22px; }
.project-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.project-panel-name {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--pc-ink);
}
.project-panel-name:hover { color: var(--pc-navy); text-decoration: none; }

.ms-strip { position: relative; padding: 18px 4px 6px; }
.ms-track {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 27px;
  height: 3px;
  background: var(--pc-line);
  border-radius: 2px;
}
.ms-track-fill { height: 3px; background: var(--pc-navy); border-radius: 2px; }
.ms-points { position: relative; display: flex; }
.ms-point { display: flex; flex-direction: column; align-items: flex-start; padding-right: 8px; }
.ms-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pc-line);
  margin-top: 2px;
}
.ms-point.is-done .ms-dot { background: var(--pc-green); border: none; }
.ms-point.is-late .ms-dot { background: var(--pc-gold); border: none; }
.ms-point.is-current .ms-dot { background: var(--pc-navy); border: none; box-shadow: 0 0 0 4px rgba(1,86,150,0.18); }
.ms-point.is-overdue .ms-dot { background: var(--pc-red); border: none; }
.ms-label {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--pc-ink);
  margin-top: 8px;
  line-height: 1.25;
}
.ms-point.is-upcoming .ms-label { color: var(--pc-muted); }
.ms-point.is-current .ms-label { color: var(--pc-navy); }
.ms-date { font-family: 'Archivo', sans-serif; font-size: 10px; color: var(--pc-muted); }
.ms-point.is-current .ms-date, .ms-point.is-overdue .ms-date { color: var(--pc-red); font-weight: 700; }

.ms-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--pc-line);
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  color: var(--pc-muted);
}
.ms-legend span { display: flex; align-items: center; gap: 6px; }
.ms-legend i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.ms-legend .dot-done { background: var(--pc-green); }
.ms-legend .dot-late { background: var(--pc-gold); }
.ms-legend .dot-current { background: var(--pc-navy); }
.ms-legend .dot-overdue { background: var(--pc-red); }
.ms-legend .dot-upcoming { background: #fff; border: 2px solid var(--pc-line); }

.project-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--pc-line);
}
.mini-stats { display: flex; gap: 26px; }
.mini-label {
  font-family: 'Archivo', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pc-muted);
}
.mini-number { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 18px; }
.mini-number.is-alert { color: var(--pc-red); }
.mini-number-sm { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 15px; padding-top: 2px; }
.panel-link {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pc-navy);
  white-space: nowrap;
}

/* ---------- Activity rows ---------- */

.activity-row { padding: 9px 0; border-bottom: 1px solid var(--pc-line); }
.activity-row:last-child { border-bottom: none; }
.activity-message { font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 600; line-height: 1.4; }
.activity-meta { font-size: 12px; color: var(--pc-muted); }

/* ---------- Admin project page ---------- */

.admin-project-bar { background: var(--pc-panel); border-bottom: 1px solid var(--pc-line); }
.admin-project-bar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.crumbs { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); margin-bottom: 6px; }
.admin-project-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-project-title h1 { font-size: 26px; margin: 0; }
.admin-project-sub { font-size: 13px; color: var(--pc-muted); margin-top: 6px; }
.admin-project-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.action-panel {
  background: var(--pc-panel);
  border: 1px solid var(--pc-navy);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 16px;
}

.filter-pills { display: flex; gap: 8px; }
.filter-pill {
  background: var(--pc-tint);
  color: var(--pc-muted);
  border: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.filter-pill.is-on { background: var(--pc-ink); color: #fff; }

.ms-edit { background: var(--pc-tint); padding: 16px; border-radius: 6px; margin-top: 14px; }
.upload-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.upload-row input[type=file] { margin-bottom: 0; }

.kv-list { display: grid; gap: 12px; font-family: 'Archivo', sans-serif; font-size: 13px; }
.kv-list > div { display: flex; justify-content: space-between; }
.kv-list span { color: var(--pc-muted); }
.kv-list .is-alert { color: var(--pc-red); }

/* ---------- Funnel visualization (project stats) ---------- */

.funnel-row { margin-bottom: 4px; }
.funnel-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  margin-bottom: 5px;
}
.funnel-row-head .label { font-weight: 700; }
.funnel-row-head .value { font-weight: 700; }
.funnel-row-head .percent { color: var(--pc-muted); font-weight: 600; margin-left: 4px; }
.funnel-bar-track { background: var(--pc-tint); border-radius: 5px; height: 22px; overflow: hidden; }
.funnel-bar-fill { height: 100%; border-radius: 5px; background: var(--pc-navy); transition: width 0.2s; }
.funnel-reduction {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  color: var(--pc-red);
  font-weight: 700;
  padding: 6px 0 10px 8px;
}

.intake-details summary {
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--pc-navy);
  cursor: pointer;
}
.intake-field { font-size: 13px; margin-bottom: 6px; }
.intake-field span { color: var(--pc-muted); font-family: 'Archivo', sans-serif; }


/* ---------- Preview mode banner ---------- */

.preview-banner {
  background: var(--pc-gold);
  color: #5c4300;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: 'Archivo', sans-serif;
  font-size: 13px;
  font-weight: 700;
  flex-wrap: wrap;
  text-align: center;
}
.preview-banner .btn {
  background: var(--pc-ink);
  color: #fff;
}

/* ---------- Wordmark lockup (Claude Design refresh, Sept 2026) ---------- */

.brand-mark { height: 36px; width: auto; }
.brand-wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.brand-wordmark .name {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
}
.brand-wordmark .tagline {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 12px;
  color: var(--pc-muted);
}

/* ---------- Files ---------- */

.file-date {
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  color: var(--pc-muted);
  white-space: nowrap;
}

/* ---------- One-time credentials ---------- */

.credential-box {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--pc-line);
  border-radius: 6px;
}
.credential-box code {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--pc-ink);
  letter-spacing: 0.02em;
}

/* ---------- Admin dashboard queues ---------- */

.stat-grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
a.stat-card { text-decoration: none; display: block; }
a.stat-card:hover { border-color: var(--pc-navy); text-decoration: none; }
.stat-card.is-alert .stat-number { color: var(--pc-red); }

.sub-section + .sub-section { margin-top: 22px; }
.sub-heading {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--pc-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--pc-line);
  margin-bottom: 4px;
}
.ms-dot.is-overdue-dot { background: var(--pc-red); border: none; margin-top: 0; }
.ms-dot.is-current-dot { background: var(--pc-navy); border: none; margin-top: 0; }
.ms-dot.is-upcoming-dot { background: #fff; border: 2px solid var(--pc-line); margin-top: 0; }

.manage-links { display: grid; gap: 2px; }
.manage-links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--pc-line);
  font-family: 'Archivo', sans-serif;
  font-size: 14px;
  color: var(--pc-ink);
}
.manage-links a:last-child { border-bottom: none; }
.manage-links a:hover { color: var(--pc-navy); text-decoration: none; }
.manage-links span { font-size: 12px; color: var(--pc-muted); font-weight: 400; }

/* ---------- Admin projects table ---------- */

.project-table td { vertical-align: top; }
.table-strong { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; color: var(--pc-ink); }
.table-strong:hover { color: var(--pc-navy); }
.cell-alert { color: var(--pc-red); font-weight: 700; font-family: 'Archivo', sans-serif; font-size: 13px; }
.cell-warn { color: #6b4f00; font-weight: 700; font-family: 'Archivo', sans-serif; font-size: 13px; }
.task-meta.is-alert { color: var(--pc-red); font-weight: 600; }
.count-pill {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  background: var(--pc-red);
  color: #fff;
  border-radius: 999px;
  font-family: 'Archivo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
}

/* ---------- Collapsed company cards ---------- */

.company-card {
  background: var(--pc-panel);
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.company-card > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.company-card > summary::-webkit-details-marker { display: none; }
.company-card[open] > summary { border-bottom: 1px solid var(--pc-line); }
.company-head { display: flex; flex-direction: column; gap: 3px; }
.company-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 17px; }
.company-meta { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); }
.company-chev { color: var(--pc-muted); font-size: 12px; transition: transform 0.15s; }
.company-card[open] .company-chev { transform: rotate(180deg); }
.company-body { padding: 20px 22px 22px; }
.company-danger { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--pc-line); display: flex; gap: 8px; }

.inline-add { margin-top: 14px; }
.inline-add > summary {
  cursor: pointer;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--pc-navy);
}

/* ---------- Staff two-step login (MFA) ----------
   Added for the MFA deploy. Nothing above this line was changed. */

.code-input {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 22px;
  letter-spacing: 0.26em;
  text-align: center;
}
.code-input::placeholder { color: var(--pc-line); }
.code-input-backup { letter-spacing: 0.16em; text-transform: uppercase; }

.mfa-card { max-width: 560px; }
.mfa-signed-in { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); margin: 0 0 10px; }
.mfa-step { margin-top: 22px; }
.mfa-step .sub-heading { margin-bottom: 14px; }

.mfa-scan { display: flex; gap: 20px; align-items: flex-start; }
.mfa-qr {
  flex-shrink: 0;
  width: 188px;
  height: 188px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
}
.mfa-qr svg { display: block; width: 100%; height: 100%; }
.mfa-scan-copy p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; }
.mfa-key summary {
  cursor: pointer;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--pc-navy);
}
.mfa-key code {
  display: block;
  margin: 10px 0 8px;
  font-size: 16px;
  letter-spacing: 0.08em;
  word-break: break-all;
}
@media (max-width: 560px) {
  .mfa-scan { flex-direction: column; align-items: center; }
}

.mfa-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 16px;
  font-family: 'Lora', serif;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--pc-ink);
  cursor: pointer;
}
.mfa-check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; }
.mfa-check em { display: block; font-size: 13px; color: var(--pc-muted); }

.mfa-attempts { font-weight: 700; }
.mfa-cancel { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--pc-line); }

.mfa-warning { border-left-color: var(--pc-gold); }
.backup-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
  margin: 0 0 18px;
  padding: 18px 18px 18px 40px;
  border: 1px solid var(--pc-line);
  border-radius: var(--radius);
  background: #fff;
}
.backup-grid li { font-family: 'Archivo', sans-serif; color: var(--pc-muted); font-size: 12px; }
.backup-grid code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--pc-ink);
}
.mfa-actions { display: flex; gap: 8px; margin-bottom: 18px; }

@media print {
  .topbar, .no-print { display: none !important; }
  .login-wrap { min-height: 0; padding: 0; }
  .login-card { border: none; padding: 0; }
}

.table-scroll { overflow-x: auto; }
.mfa-reset-panel { margin: 12px 4px; }
.mfa-reset-panel h3 { font-size: 17px; margin: 10px 0 6px; }
.mfa-reset-panel p { font-size: 14px; margin: 0 0 14px; max-width: 70ch; }
.mfa-reset-log { list-style: none; margin: 10px 0 0; padding: 0; }
.mfa-reset-log li { padding: 8px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; }
.mfa-reset-log .task-meta { display: block; }
.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover, .btn[disabled]:hover { background: var(--pc-ink); }

/* ==========================================================================
   Deploy 2: data handling (terms, custody panel, closeout, deletions due,
   staff file browser). New section appended at the bottom only.
   ========================================================================== */

input[type=number] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--pc-line); border-radius: 6px;
  font-family: 'Lora', serif; font-size: 15px; background: #fff; color: var(--pc-ink);
}
.num-inline { width: 84px !important; text-align: center; font-family: 'Archivo', sans-serif !important; font-weight: 700; display: inline-block; margin: 0 8px; }
.inline-field { display: flex; align-items: center; flex-wrap: wrap; font-family: 'Lora', serif; font-size: 15px; margin-bottom: 10px; }
.help { font-family: 'Lora', serif; font-style: italic; font-size: 13px; color: var(--pc-muted); margin: 6px 0 0; line-height: 1.5; }
.note-box { background: var(--pc-tint); border-radius: 4px; padding: 12px 14px; font-family: 'Lora', serif; font-size: 14px; line-height: 1.5; margin: 10px 0; }
.note-box strong { font-family: 'Archivo', sans-serif; }
.form-rule { border: 0; border-top: 1px solid var(--pc-line); margin: 20px 0; }
.notice-ok { background: rgba(139,196,63,0.18); border-left: 3px solid var(--pc-green); color: #2c4a12; padding: 10px 14px; font-family: 'Archivo', sans-serif; font-size: 14px; border-radius: 3px; margin-bottom: 16px; }
.pill-soft { background: var(--pc-tint); color: var(--pc-muted); }
.pill-small { font-size: 10px; padding: 3px 9px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Toggle switch: "Contains personal information" */
.toggle { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 400; margin: 0; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px; background: var(--pc-line); position: relative; transition: background .15s; margin-top: 2px; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.toggle input:checked + .toggle-track { background: var(--pc-navy); }
.toggle input:checked + .toggle-track::after { left: 23px; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--pc-navy); outline-offset: 2px; }
.toggle-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; color: var(--pc-ink); }
.toggle-body { font-family: 'Lora', serif; font-size: 14px; color: var(--pc-muted); line-height: 1.5; margin-top: 2px; }

.contact-list { border: 1px solid var(--pc-line); border-radius: 6px; }
.contact-list label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--pc-line); text-transform: none; letter-spacing: normal; font-weight: 400; cursor: pointer; }
.contact-list label:last-child { border-bottom: none; }
.contact-list input { width: auto; margin: 0; }
.contact-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; color: var(--pc-ink); }
.contact-email { font-family: 'Lora', serif; font-size: 12px; color: var(--pc-muted); }

/* Client terms table */
.terms-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; }
.terms-table th { width: 34%; vertical-align: top; padding: 14px 16px 14px 0; font-size: 11px; }
.terms-table td { font-family: 'Lora', serif; font-size: 15px; line-height: 1.5; padding: 12px 0; }
.ack-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: 'Archivo', sans-serif; font-size: 13px; color: var(--pc-muted); }
@media (max-width: 560px) {
  .terms-table th, .terms-table td { display: block; width: 100%; padding: 4px 0; border: none; }
  .terms-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--pc-line); }
}

/* Custody timeline (vertical, works on mobile) */
.custody { list-style: none; margin: 4px 0 0; padding: 0; }
.custody-step { display: grid; grid-template-columns: 22px 1fr; gap: 0 12px; position: relative; }
.custody-rail { position: relative; display: flex; justify-content: center; }
.custody-rail::after { content: ''; position: absolute; top: 18px; bottom: -4px; width: 2px; background: var(--pc-line); }
.custody-step:last-child .custody-rail::after { display: none; }
.custody-step.is-done .custody-rail::after { background: var(--pc-green); }
.custody-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: #fff; border: 2px solid var(--pc-line); position: relative; z-index: 1; }
.custody-step.is-done .custody-dot { background: var(--pc-green); border-color: var(--pc-green); }
.custody-step.is-in_progress .custody-dot { background: var(--pc-navy); border-color: var(--pc-navy); box-shadow: 0 0 0 4px rgba(1,86,150,.18); }
.custody-body { padding-bottom: 16px; min-width: 0; }
.custody-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.custody-label { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; color: var(--pc-ink); }
.custody-step.is-pending .custody-label { color: var(--pc-muted); }
.custody-step.is-in_progress .custody-label { color: var(--pc-navy); }
.custody-status { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--pc-muted); }
.custody-step.is-done .custody-status { color: #3d611a; }
.custody-step.is-in_progress .custody-status { color: var(--pc-navy); }
.custody-detail { font-family: 'Lora', serif; font-size: 14px; color: var(--pc-ink); line-height: 1.45; margin-top: 2px; overflow-wrap: anywhere; }
.custody-step.is-pending .custody-detail { color: var(--pc-muted); }
.custody-source { font-family: 'Archivo', sans-serif; font-size: 11px; color: var(--pc-muted); margin-top: 3px; }
.custody-action { margin-top: 8px; }
.custody-action form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.custody-action input[type=text] { flex: 1; min-width: 180px; margin: 0; padding: 7px 10px; font-size: 13px; }

.access-summary { border-top: 1px solid var(--pc-line); margin-top: 6px; padding-top: 12px; }
.access-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-family: 'Archivo', sans-serif; font-size: 13px; border-bottom: 1px solid var(--pc-line); }
.access-row:last-child { border-bottom: none; }
.access-row span:last-child { color: var(--pc-muted); white-space: nowrap; }
.access-row strong { font-size: 15px; }

/* Retention line: scheduled (neutral), due soon (yellow), overdue (red) */
.retention-line { display: flex; align-items: center; gap: 10px; border-radius: 4px; padding: 11px 14px; margin-top: 12px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; background: var(--pc-tint); color: var(--pc-ink); }
.retention-line::before { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--pc-muted); }
.retention-line.is-due-soon { background: var(--pc-gold); color: #3d2e00; }
.retention-line.is-due-soon::before { background: #3d2e00; }
.retention-line.is-overdue { background: rgba(196,32,50,.09); color: #7a1420; border-left: 3px solid var(--pc-red); }
.retention-line.is-overdue::before { background: var(--pc-red); }
.retention-line.is-done { background: rgba(139,196,63,.18); color: #2c4a12; }
.retention-line.is-done::before { background: var(--pc-green); }
.retention-line a { margin-left: auto; color: inherit; text-decoration: underline; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }

/* Closeout checklist */
.checklist-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 0 12px; padding: 14px 0; border-bottom: 1px solid var(--pc-line); align-items: start; }
.checklist-item:last-of-type { border-bottom: none; }
.checklist-item input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pc-navy); }
.checklist-label { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; }
.checklist-meta { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); margin-top: 2px; }
.checklist-help { font-family: 'Lora', serif; font-size: 14px; color: var(--pc-muted); margin-top: 3px; line-height: 1.45; }
.checklist-state { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-muted); white-space: nowrap; padding-top: 2px; }
.checklist-state.is-done { color: #3d611a; }
.file-check-list { border: 1px solid var(--pc-line); border-radius: 6px; margin: 12px 0 14px; max-height: 320px; overflow-y: auto; }
.file-check-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--pc-line); font-family: 'Archivo', sans-serif; font-size: 13px; overflow-wrap: anywhere; }
.file-check-list div:last-child { border-bottom: none; }
.file-check-list span:last-child { color: var(--pc-muted); white-space: nowrap; }

/* Deletions due */
.deadline-pill { display: inline-block; border-radius: 999px; padding: 4px 11px; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.deadline-pill.is-overdue { background: var(--pc-red); color: #fff; }
.deadline-pill.is-due-soon { background: var(--pc-gold); color: #3d2e00; }
.deadline-pill.is-scheduled { background: var(--pc-tint); color: var(--pc-muted); }
.deadline-pill.is-disposed { background: rgba(139,196,63,.22); color: #2c4a12; }
.deadline-sub { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); margin-top: 3px; }
.stat-card.is-warn .stat-number { color: #5c4300; }
.table-scroll { overflow-x: auto; }
.table-link { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }

/* ---------- Staff file browser ---------- */
.fb-note { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); text-align: right; }
.fb-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.fb-up { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--pc-line); border-radius: 6px; color: var(--pc-ink); font-weight: 700; text-decoration: none; }
.fb-up:hover { border-color: var(--pc-muted); text-decoration: none; }
.fb-crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 700; min-width: 0; }
.fb-crumbs a { color: var(--pc-ink); }
.fb-crumbs .is-current { color: var(--pc-navy); }
.fb-crumbs .sep { color: var(--pc-muted); font-weight: 400; }
.fb-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fb-filter { width: 180px !important; margin: 0 !important; padding: 7px 10px !important; font-size: 13px !important; }
.fb-newfolder { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--pc-line); }
.fb-newfolder input { flex: 1; min-width: 160px; margin: 0; padding: 7px 10px; }
.fb-head, .fb-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 90px 90px 170px; gap: 0 14px; align-items: center; }
.fb-head { padding: 6px 0 8px; border-bottom: 1px solid var(--pc-line); font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--pc-muted); }
.fb-head span:first-child { grid-column: 2; }
.fb-row { padding: 10px 0; border-bottom: 1px solid var(--pc-line); font-family: 'Archivo', sans-serif; font-size: 14px; }
.fb-badge { width: 34px; height: 34px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 9px; letter-spacing: .03em; }
.fb-name { min-width: 0; }
.fb-name a, .fb-name .fb-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--pc-ink); }
.fb-row.is-dir .fb-name a { font-weight: 700; }
.fb-sub { font-size: 12px; color: var(--pc-muted); margin-top: 2px; }
.fb-size, .fb-date { font-size: 13px; color: var(--pc-muted); }
.fb-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.fb-actions form { margin: 0; }
.btn-dl { background: #fff; color: var(--pc-navy); border: 1.5px solid var(--pc-navy); }
.btn-dl:hover { background: var(--pc-navy); color: #fff; }
.btn-del { background: none; border: none; color: var(--pc-muted); font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; padding: 8px 6px; }
.btn-del:hover { color: var(--pc-red); }
.fb-chevron { display: none; color: var(--pc-muted); font-size: 20px; }
.fb-empty { text-align: center; font-family: 'Lora', serif; font-style: italic; color: var(--pc-muted); padding: 28px 0; }
.fb-pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 0; font-family: 'Archivo', sans-serif; font-size: 13px; color: var(--pc-muted); }
.fb-upload { border-top: 1px solid var(--pc-line); margin-top: 14px; padding-top: 14px; }
.fb-upload-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.fb-upload-row input[type=file] { flex: 1; min-width: 200px; margin: 0; border: none; padding: 0; background: none; }
.fb-banner { display: flex; align-items: center; gap: 12px; border-radius: 4px; padding: 12px 16px; margin-bottom: 14px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; }
.fb-banner::before { content: ''; flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; }
.fb-banner a { margin-left: auto; color: inherit; text-decoration: underline; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.fb-banner.is-due-soon { background: var(--pc-gold); color: #3d2e00; }
.fb-banner.is-due-soon::before { background: #3d2e00; }
.fb-banner.is-overdue { background: rgba(196,32,50,.09); color: #7a1420; border-left: 3px solid var(--pc-red); }
.fb-banner.is-overdue::before { background: var(--pc-red); }
.fb-banner.is-done { background: rgba(139,196,63,.18); color: #2c4a12; }
.fb-banner.is-done::before { display: none; }
.fb-uploads:empty { display: none; }
.fb-upload-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 0 12px; align-items: center; padding: 10px 12px; border-radius: 6px; margin: 8px 0; background: var(--pc-cream); border: 1px solid var(--pc-line); font-family: 'Archivo', sans-serif; font-size: 13px; }
.fb-upload-item.is-failed { background: rgba(196,32,50,.07); border-color: rgba(196,32,50,.35); }
.fb-progress { height: 4px; background: var(--pc-line); border-radius: 2px; margin: 6px 0 4px; overflow: hidden; }
.fb-progress span { display: block; height: 100%; width: 0; background: var(--pc-navy); transition: width .2s; }
.fb-upload-item .fb-err { color: #7a1420; font-weight: 700; margin-top: 3px; }
.fb-upload-item .fb-err-actions { margin-top: 8px; display: flex; gap: 8px; }

.fb-modal-wrap { position: absolute; inset: 0; background: rgba(26,26,26,.35); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; z-index: 20; border-radius: var(--radius); }
.fb-modal-wrap[hidden] { display: none; }
.fb-modal { background: #fff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.2); padding: 22px; width: 100%; max-width: 420px; }
.fb-modal h3 { font-family: 'Archivo', sans-serif; font-weight: 800; text-transform: uppercase; font-size: 17px; margin: 0 0 12px; }
.fb-modal-file { display: flex; align-items: center; gap: 10px; background: var(--pc-cream); border: 1px solid var(--pc-line); border-radius: 6px; padding: 10px 12px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.fb-modal p { font-family: 'Lora', serif; font-size: 14px; line-height: 1.55; margin: 12px 0 16px; }
.fb-modal-actions { display: flex; gap: 10px; align-items: center; }
.files-card { position: relative; }

@media (max-width: 640px) {
  .fb-head { display: none; }
  .fb-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .fb-size, .fb-date { display: none; }
  .fb-sub-mobile { display: block !important; }
  .fb-row.is-dir .fb-chevron { display: block; }
  .fb-actions .btn-dl { min-height: 44px; padding: 10px 14px; }
  .fb-tools { margin-left: 0; width: 100%; }
  .fb-filter { flex: 1; width: auto !important; }
  .fb-note { text-align: left; }
}
.fb-sub-mobile { display: none; }
@media (max-width: 640px) { .fb-desktop-only { display: none !important; } }
.files-card [hidden] { display: none !important; }

/* ==========================================================================
   Layout and width review, batch 1 (from Claude Design's Layout Review).
   Appended at the bottom only. Changes width, arrangement, collapsing and
   phone behaviour. No colours, type or component styles change.
   ========================================================================== */

/* Page width: one fluid container up to 1600 wide, instead of a fixed
   1120. The quote builder page (.page-wide) uses the same width. */
.page,
.page-wide,
.topbar-inner,
.admin-project-bar-inner {
  max-width: 1600px;
  padding-left: clamp(16px, 3vw, 40px);
  padding-right: clamp(16px, 3vw, 40px);
}

/* Forms and single-card pages */
.page-narrow { max-width: 960px; margin-left: auto; margin-right: auto; }

/* Keep paragraph lines readable however wide the card gets. Centered
   "nothing here yet" messages are left out so they stay centered. */
.card p:not(.empty-state) { max-width: 70ch; }

/* Pattern A: main + side. The side drops below when main would be
   narrower than 560. */
.layout-side { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.layout-side > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.layout-side > .side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* Pattern B: two equal columns. They stack below about 1,280 wide. */
.layout-2up {
  display: grid;
  gap: 18px;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
}
.layout-2up > * { min-width: 0; }

/* Rows of patterns */
.layout-rows { display: flex; flex-direction: column; gap: 18px; }
.layout-side .card,
.layout-2up .card,
.layout-rows .card { margin-top: 0; margin-bottom: 0; }

/* Existing two-column layouts get the new width, on larger screens only.
   The phone rules earlier in this file (one column below 940 and 800)
   still apply because these sit inside matching min-width queries. */
@media (min-width: 941px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
}
@media (min-width: 801px) {
  .two-col { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
}

/* Collapsible cards: <details class="card card-collapse"> */
.card-collapse > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.card-collapse > summary::-webkit-details-marker { display: none; }
.card-collapse[open] > summary { margin-bottom: 14px; }
.card-collapse .collapse-toggle {
  font-family: 'Archivo', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--pc-navy);
}
.card-collapse .collapse-toggle::after { content: ' \25BE'; }
.card-collapse[open] .collapse-toggle { font-size: 0; }
.card-collapse[open] .collapse-toggle::before { content: 'Hide'; font-size: 11px; }
.card-collapse[open] .collapse-toggle::after { content: ' \25B4'; font-size: 11px; }
.card-collapse .collapse-summary { font-family: 'Archivo', sans-serif; font-size: 13px; color: var(--pc-muted); margin-top: 8px; }
.card-collapse[open] .collapse-summary { display: none; }

/* Row actions: on narrow cards the buttons drop under the text instead of
   squeezing it. Aimed at the text block, not the first child, because on
   the client side the first child is the task's checkbox. */
.task-row { flex-wrap: wrap; }
.task-row > div:not(.row-actions) { flex: 1 1 240px !important; min-width: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }

@media (max-width: 640px) {
  /* Milestone strip becomes a list (fixes sideways scrolling) */
  .ms-strip { padding: 4px 0 0; }
  .ms-track { display: none; }
  .ms-points { flex-direction: column; }
  .ms-point {
    width: auto !important;
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--pc-tint);
  }
  .ms-point .ms-dot { margin-top: 0; }
  .ms-point .ms-label { margin-top: 0; font-size: 13px; }
  .ms-point .ms-date { font-size: 12px; white-space: nowrap; }

  /* Stacked tables: class="table-stack" on the table, data-label on each
     cell. The header row hides and each row becomes a small block. */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 0; border-bottom: 1px solid var(--pc-line); }
  .table-stack td { border: 0; padding: 3px 0; }
  .table-stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase; color: var(--pc-muted);
  }
  .table-stack td:empty { display: none; }

  .row-actions { flex-basis: 100%; }
}

/* Phone section bar on the project pages. Hidden above 640. */
.section-jump { display: none; }
@media (max-width: 640px) {
  .section-jump {
    display: flex; gap: 6px;
    position: sticky; top: 0; z-index: 20;
    margin: 0 calc(-1 * clamp(16px, 3vw, 40px)) 16px;
    padding: 10px clamp(16px, 3vw, 40px);
    background: var(--pc-cream);
    border-bottom: 1px solid var(--pc-line);
    box-shadow: 0 2px 6px rgba(26, 26, 26, 0.06);
  }
  .section-jump a {
    flex: 1 1 auto; min-height: 36px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 8px; border-radius: 999px;
    border: 1.5px solid var(--pc-line); background: var(--pc-panel); color: var(--pc-ink);
    font-family: 'Archivo', sans-serif; font-size: 11px; font-weight: 700;
    letter-spacing: 0.03em; text-transform: uppercase; white-space: nowrap;
    text-decoration: none;
  }
  .section-jump a.is-on { background: var(--pc-navy); border-color: var(--pc-navy); color: #fff; }
  [data-jump-target] { scroll-margin-top: 64px; }
}

/* Needs you rows (client dashboard): due date and Open button stay on the
   right on wider screens, and drop under the task text on phones. */
.attention-row { flex-wrap: wrap; }
.attention-row .row-actions { align-items: center; gap: 16px; }
@media (max-width: 640px) {
  .attention-row .row-actions { padding-left: 34px; justify-content: space-between; }
}

/* ==========================================================================
   Layout and width review, batch 2
   ========================================================================== */

/* Client project page: name, status and Download Summary on one row */
.client-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.client-title-row h1 { margin: 0; }
/* Download summary picker (views/partials/summary-download.ejs) */
.sd { position: relative; display: inline-block; }
.sd > summary { cursor: pointer; list-style: none; }
.sd > summary::-webkit-details-marker { display: none; }
/* Opens as a centred window over a dimmed page, so it never runs off screen. */
.sd-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(26,26,26,0.45); }
.sd-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1001;
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: #fff; border: 1px solid var(--pc-line); border-radius: 10px; box-shadow: 0 18px 48px rgba(26,26,26,0.25);
  padding: 20px; text-align: left;
}
.sd-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-close { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 6px; font: 400 22px/1 'Archivo', sans-serif; color: var(--pc-muted); cursor: pointer; }
.sd-close:hover { background: var(--pc-tint); color: var(--pc-ink); }
body.sd-open { overflow: hidden; }
.sd-title { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-ink); }
.sd-help { font-family: 'Lora', serif; font-size: 13px; color: var(--pc-muted); margin: 4px 0 12px; line-height: 1.45; }
.sd-presets { display: flex; gap: 4px; padding: 4px; background: var(--pc-tint); border-radius: 8px; margin-bottom: 10px; }
.sd-preset { flex: 1; border: 0; background: transparent; border-radius: 6px; padding: 7px 6px; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; color: var(--pc-muted); cursor: pointer; white-space: nowrap; }
.sd-preset.is-on { background: #fff; color: var(--pc-navy); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.sd-list { display: flex; flex-direction: column; }
.sd-item, .sd-item strong, .sd-item small { text-transform: none; letter-spacing: normal; }
.sd-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid var(--pc-tint); cursor: pointer; margin: 0; }
.sd-item:last-child { border-bottom: 0; }
.sd-item input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--pc-navy); }
.sd-item strong { display: block; font-family: 'Archivo', sans-serif; font-size: 14px; font-weight: 700; color: var(--pc-ink); }
.sd-item small { display: block; font-family: 'Lora', serif; font-size: 12.5px; color: var(--pc-muted); margin-top: 2px; line-height: 1.4; }
.sd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pc-line); }
.sd-count { font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 600; color: var(--pc-muted); }
.sd-foot .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 600px) {
  .sd-panel { padding: 16px; max-height: calc(100vh - 32px); }
}

/* Acknowledged terms: one bar, full terms inside */
.terms-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.terms-bar h2 { margin: 0; }
.card-collapse .collapse-toggle { white-space: nowrap; }
.card-collapse .collapse-toggle[data-closed] { font-size: 0; }
.card-collapse .collapse-toggle[data-closed]::before { content: attr(data-closed); font-size: 11px; }
.card-collapse .collapse-toggle[data-closed]::after { font-size: 11px; }
.card-collapse[open] .collapse-toggle[data-open]::before { content: attr(data-open); }

/* ==========================================================================
   Client project page (Claude Design's "Client Project Page" board).
   Client page only. The staff project page doesn't use these classes.
   ========================================================================== */

/* Terms rows: two columns on wide screens */
.terms-grid { display: grid; gap: 0 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.terms-grid .terms-table { margin-bottom: 6px; }

/* Timeline strip: one column per milestone, the progress line under the dots */
.tl-summary { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; color: var(--pc-ink); text-align: right; }
.tl-strip, .dh-strip { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 16px; }
.tl-strip { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 4px; }
.dh-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 4px; }
.tl-strip::before, .tl-strip::after, .dh-strip::before, .dh-strip::after { content: ''; position: absolute; left: 11px; }
.tl-strip::before { right: 0; top: 10px; height: 3px; background: var(--pc-line); border-radius: 2px; }
.tl-strip::after { top: 10px; height: 3px; background: var(--pc-green); border-radius: 2px; width: calc((100% + 16px) * var(--tl-fill, 0)); }
.dh-strip::before { left: 6px; right: 0; top: 5px; height: 2px; background: var(--pc-line); }
.dh-strip::after { left: 6px; top: 5px; height: 2px; background: var(--pc-green); width: calc((100% + 16px) * var(--dh-fill, 0)); }
.tl-step, .dh-step { position: relative; z-index: 1; min-width: 0; }

.tl-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
          background: #fff; border: 2px solid var(--pc-line); color: #fff; font-size: 12px; font-weight: 800; }
.tl-step.is-done .tl-dot { background: var(--pc-green); border-color: var(--pc-green); }
.tl-step.is-late .tl-dot { background: var(--pc-gold); border-color: var(--pc-gold); }
.tl-step.is-current .tl-dot { border-color: var(--pc-navy); box-shadow: 0 0 0 4px rgba(1,86,150,0.15); }
.tl-step.is-overdue .tl-dot { border-color: var(--pc-red); }
.tl-step.is-current.is-overdue .tl-dot { box-shadow: 0 0 0 4px rgba(196,32,50,0.12); }
.tl-title { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; line-height: 1.3; }
.tl-step.is-current .tl-title { color: var(--pc-navy); }
.tl-step.is-upcoming .tl-title { color: var(--pc-ink); }
.tl-flag { color: var(--pc-red); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.tl-date { font-family: 'Lora', serif; font-size: 13px; color: var(--pc-muted); margin-top: 2px; }
.tl-step.is-overdue .tl-date { color: var(--pc-red); }
.tl-note { font-family: 'Lora', serif; font-size: 12px; font-style: italic; color: var(--pc-muted); margin-top: 3px; line-height: 1.4; }

/* Approval box: under the strip, full width. Mark Approved on the right. */
.approval-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
                margin-top: 18px; padding: 14px 18px; background: var(--pc-tint); border-radius: 6px; }
.approval-body { flex: 1 1 320px; min-width: 0; }
.approval-label { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pc-red); margin-bottom: 3px; }
.approval-box .task-title { font-size: 15px; }
/* "Request changes" on an approval: opens a short form under the buttons. */
.request-changes { display: flex; flex-direction: column; align-items: flex-end; }
.request-changes summary { list-style: none; cursor: pointer; }
.approval-box .note-box { background: var(--pc-panel); }
.request-changes summary::-webkit-details-marker { display: none; }
.request-changes[open] summary { background: var(--pc-ink); color: #fff; }
.request-changes-form { margin-top: 10px; width: min(340px, 80vw); text-align: left; }
.request-changes-form label { margin-top: 0; }
.request-changes-form textarea { width: 100%; margin-bottom: 8px; }
.approval-files { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-family: 'Archivo', sans-serif; font-size: 13px; }
.approval-files a { color: var(--pc-navy); overflow-wrap: anywhere; }

/* Data Handling strip (client) */
.dh-dot { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--pc-line); margin-bottom: 10px; }
.dh-step.is-done .dh-dot { background: var(--pc-green); border-color: var(--pc-green); }
.dh-step.is-in_progress .dh-dot { background: var(--pc-navy); border-color: var(--pc-navy); box-shadow: 0 0 0 3px rgba(1,86,150,0.18); }
.dh-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; color: var(--pc-ink); }
.dh-step.is-pending .dh-name { color: var(--pc-muted); }
.dh-step.is-in_progress .dh-name { color: var(--pc-navy); }
.dh-status { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--pc-muted); margin-top: 2px; }
.dh-step.is-done .dh-status { color: #3d611a; }
.dh-step.is-in_progress .dh-status { color: var(--pc-navy); }
.dh-detail { font-family: 'Lora', serif; font-size: 13px; line-height: 1.45; color: var(--pc-ink); margin-top: 4px; overflow-wrap: anywhere; }
.dh-step.is-pending .dh-detail { color: var(--pc-muted); }
.dh-source { font-family: 'Archivo', sans-serif; font-size: 11px; color: var(--pc-muted); margin-top: 3px; }
.dh-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
           margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pc-line); }
.dh-access { margin: 0; font-family: 'Archivo', sans-serif; font-size: 13px; }
.dh-access span { font-family: 'Lora', serif; font-style: italic; color: var(--pc-muted); }
.dh-foot .retention-line { margin-top: 0; }

/* Narrower laptops: six steps get tight, so they go three by two */
@media (max-width: 1100px) and (min-width: 641px) {
  .dh-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .dh-strip::before, .dh-strip::after { display: none; }
}

/* Phones: both strips go back to vertical lists */
@media (max-width: 640px) {
  .tl-strip, .dh-strip { grid-template-columns: 1fr; grid-auto-flow: row; grid-auto-columns: auto; gap: 4px; }
  .tl-strip::before, .tl-strip::after, .dh-strip::before, .dh-strip::after { display: none; }
  .tl-step, .dh-step { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; padding: 8px 0; }
  .tl-step > :not(.tl-dot), .dh-step > :not(.dh-dot) { grid-column: 2; }
  .tl-dot, .dh-dot { grid-row: 1 / span 4; margin-bottom: 0; }
  .dh-dot { margin: 3px 0 0 5px; }
  .tl-summary { text-align: left; }
  .approval-box .inline-form, .approval-box .btn { width: 100%; }
}

/* ==========================================================================
   Layout and width review, batch 3 (small fixes)
   ========================================================================== */

/* Login: keep the form a comfortable width inside its panel on big screens */
.frontdoor-login form,
.frontdoor-login .access-block { max-width: 440px; }

/* Team page "Add a team member": two fields per row when there's room */
.field-grid-2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* Client Files page: the date gets its own column so rows line up */
.file-row-dated { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto; align-items: center; column-gap: 12px; }
.file-row-dated .file-info { align-items: center; }
.file-row-dated .file-name { padding-top: 0; }

@media (max-width: 640px) {
  /* Stacked tables: let button cells wrap instead of running off the edge */
  .table-stack td { white-space: normal !important; }
  .table-stack td .inline-form { display: inline-block; margin: 2px 4px 2px 0; }

  /* Client Files on phones: shorten long names (full name on hover),
     date moves under the name */
  .file-row-dated { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .file-row-dated .file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; min-width: 0; }
  .file-row-dated .file-info { min-width: 0; overflow: hidden; }
  .file-row-dated .file-date { grid-row: 2; grid-column: 1; padding-left: 44px; }
  .file-row-dated > :last-child { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}

/* ---------- Deploy 3: Job Numbers and partners ---------- */

/* Job Number, e.g. PCD-26-0142. Small tracked label so it reads as a
   reference, not a heading. */
.job-number {
  display: inline-block;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-muted);
  white-space: nowrap;
}
.job-number-title { margin-bottom: 4px; }
td .job-number { font-size: 11px; }

.callout.callout-gold { border-left-color: var(--pc-gold); }
.callout.callout-red { border-left-color: var(--pc-red); }
.partner-alert a { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; margin-left: 4px; white-space: nowrap; }

.partner-facts { margin: 0 0 14px; }
.partner-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; }
.partner-facts > div:last-child { border-bottom: 0; }
.partner-facts dt { color: var(--pc-muted); }
.partner-facts dd { margin: 0; font-family: 'Archivo', sans-serif; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.partner-private { font-style: italic; margin-top: 14px; }

/* ---------- Deploy 3, stage 2: partner area ---------- */

/* Black band under the header on every partner page. No new colour: it's
   the brand ink, so partner access is obvious at a glance. */
.partner-band { background: var(--pc-ink); color: #fff; }
.partner-band-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px clamp(16px, 3vw, 40px);
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.partner-band-label { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.partner-band-name { font-family: 'Archivo', sans-serif; font-size: 13px; color: #d9d4c7; }
.nav-name { font-family: 'Archivo', sans-serif; font-size: 14px; color: var(--pc-muted); }

.pj-card { display: block; }
.pj-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.pj-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 19px; color: var(--pc-ink); }
.pj-sub { font-size: 14px; color: var(--pc-muted); margin-top: 2px; }
.pj-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pj-open { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.pj-stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--pc-line); }
.pj-stat .mini-label { display: block; }
.pj-stat strong { font-family: 'Archivo', sans-serif; font-size: 17px; }

.rel-list { list-style: none; margin: 0; padding: 0; }
.rel-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--pc-line); flex-wrap: wrap; }
.rel-item:last-child { border-bottom: 0; }
.rel-name { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.rel-item.is-off .rel-name { text-decoration: line-through; color: var(--pc-muted); }
.rel-meta { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); margin-top: 2px; }
.rel-foot { font-style: italic; color: var(--pc-muted); font-size: 14px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--pc-line); }
.note-set { background: var(--pc-tint); border-radius: 4px; padding: 12px 14px; font-size: 14px; margin-top: 12px; }

/* Release controls in the staff file browser */
.fb-release { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.fb-release .pill { font-size: 10px; }
.fb-release form { margin: 0; }
.link-small { background: none; border: 0; padding: 0; color: var(--pc-navy); font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 12px; cursor: pointer; }
.link-small:hover { text-decoration: underline; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-body {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  width: min(300px, 80vw); background: var(--pc-panel); border: 1px solid var(--pc-line); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(26, 26, 26, 0.12); padding: 14px; display: flex; flex-direction: column; gap: 12px; white-space: normal;
}
.row-menu-body form { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.row-menu-body input[type=text] { margin: 0; }
@media (max-width: 700px) { .row-menu-body { position: static; width: 100%; margin-top: 8px; box-shadow: none; } }
.page-narrow-doc { max-width: 760px; }
.accept-form { border-top: 1px solid var(--pc-line); margin-top: 18px; }
.card p.rel-foot { max-width: none; }
.pc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 20px; }
.pc-fields .pc-wide { grid-column: 1 / -1; }
.pc-fields textarea { width: 100%; }
.missing-list { margin: 6px 0 0; padding-left: 18px; }
.doc-frame-wrap { border: 1px solid var(--pc-line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.doc-frame { display: block; width: 100%; height: 560px; border: 0; }
.sig-input { font-family: 'Lora', serif; font-style: italic; font-size: 20px; }
@media (max-width: 700px) { .doc-frame { height: 440px; } }

/* ---------- Deploy 3, stage 3: partner checklist and disposal ---------- */
.btn-link { background: none; border: 0; padding: 0; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 12px; color: var(--pc-navy); cursor: pointer; text-decoration: underline; }
.btn-link:hover { color: var(--pc-ink); }
.pc-intro { margin: 0 0 6px; font-size: 15px; line-height: 1.55; }
.pc-due { display: inline; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 14px; }
.pc-due.is-overdue { color: var(--pc-red); }
.pc-due.is-due-soon { color: #7a5a00; }
.pc-list { list-style: none; margin: 0; padding: 0; }
.pc-step { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 0 14px; padding: 16px 0; border-bottom: 1px solid var(--pc-line); align-items: start; }
.pc-num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--pc-line); display: flex; align-items: center; justify-content: center; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 13px; color: var(--pc-muted); background: var(--pc-panel); }
.pc-step.is-next .pc-num { border-color: var(--pc-navy); color: var(--pc-navy); box-shadow: 0 0 0 4px rgba(1,86,150,.12); }
.pc-step.is-done .pc-num { background: var(--pc-green); border-color: var(--pc-green); color: #fff; }
.pc-label { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.3; padding-top: 4px; }
.pc-step:not(.is-done):not(.is-next) .pc-label { color: var(--pc-muted); }
.pc-value { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; margin-top: 4px; color: var(--pc-navy); }
.pc-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0 0; }
.pc-date { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.pc-date input { font-family: 'Archivo', sans-serif; font-size: 14px; padding: 7px 10px; border: 1.5px solid var(--pc-line); border-radius: 4px; background: var(--pc-panel); }
.pc-side { text-align: right; padding-top: 6px; }
.pc-confirm { margin-top: 18px; padding: 16px 18px; background: var(--pc-tint); border-radius: 6px; }
.pc-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-family: 'Lora', serif; font-size: 14.5px; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: 0; cursor: pointer; }
.pc-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--pc-navy); }
.pc-locked { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 15px; line-height: 1.45; padding-left: 12px; border-left: 3px solid var(--pc-green); }
.pj-card.is-confirmed { opacity: .82; }
.pj-card.is-confirmed .pj-name { color: var(--pc-muted); }
.pj-group { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--pc-muted); margin: 26px 0 10px; }

/* Staff closeout: the partner item and recording on the partner's behalf */
.checklist-item.is-waiting { background: rgba(255,214,0,.12); margin: 0 -14px; padding: 14px; border-radius: 4px; border-bottom: 0; }
.checklist-state.is-waiting { color: #7a5a00; }
.behalf-box { margin-top: 12px; padding: 14px 16px; border: 1.5px dashed var(--pc-line); border-radius: 6px; background: var(--pc-panel); }
.behalf-box summary { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; color: var(--pc-navy); cursor: pointer; }
.behalf-box .form-row { margin-top: 12px; }
.behalf-box textarea { width: 100%; min-height: 70px; }
.partner-history { list-style: none; margin: 0; padding: 0; }
.partner-history li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; line-height: 1.45; }
.partner-history li:last-child { border-bottom: 0; }
.partner-history .ph-when { font-family: 'Archivo', sans-serif; font-size: 12px; color: var(--pc-muted); white-space: nowrap; }
.custody-step.is-alert-overdue .custody-status { color: var(--pc-red); font-weight: 700; }
.custody-step.is-alert-due-soon .custody-status { color: #7a5a00; font-weight: 700; }
.cert-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pc-line); }

@media (max-width: 640px) {
  .pc-step { grid-template-columns: 30px minmax(0, 1fr); }
  .pc-side { grid-column: 2; text-align: left; padding-top: 8px; }
  .pc-confirm { padding: 14px; }
  .partner-history li { flex-direction: column; gap: 2px; }
}

/* Partner jobs have eight custody steps */
.dh-strip.dh-strip-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.dh-strip-8 .dh-detail { font-size: 12.5px; }
@media (max-width: 1360px) and (min-width: 641px) {
  .dh-strip.dh-strip-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; }
  .dh-strip.dh-strip-8::before, .dh-strip.dh-strip-8::after { display: none; }
}
@media (max-width: 640px) {
  .dh-strip.dh-strip-8 { grid-template-columns: 1fr; }
}

/* All Projects: stage tabs and search-everything */
.pl-head { flex-wrap: wrap; gap: 12px; }
.pl-search { flex: 1 1 320px; max-width: 460px; }
.pl-search input { width: 100%; margin: 0; font-family: 'Lora', serif; font-size: 15px; padding: 9px 12px; border: 1.5px solid var(--pc-line); border-radius: 4px; background: var(--pc-panel); }
.pl-search input:focus { border-color: var(--pc-navy); outline: none; box-shadow: 0 0 0 3px rgba(1,86,150,.12); }
.pl-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--pc-line); margin: 4px 0 6px; }
.pl-tab { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; padding: 10px 12px 9px; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-muted); cursor: pointer; white-space: nowrap; }
.pl-tab:hover { color: var(--pc-ink); }
.pl-tab.is-on { color: var(--pc-ink); border-bottom-color: var(--pc-navy); }
.pl-count { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 4px; border-radius: 99px; background: var(--pc-tint); color: var(--pc-muted); font-size: 11px; letter-spacing: 0; text-align: center; }
.pl-tab.is-on .pl-count { background: var(--pc-ink); color: #fff; }
.pl-tab.has-alert .pl-count { background: var(--pc-red); color: #fff; }
.pl-tabs.is-searching .pl-tab { opacity: .5; }
/* iPad: tighter tabs so all six stay on one line; if they still don't fit,
   the row scrolls sideways instead of wrapping onto a second line. */
@media (min-width: 641px) and (max-width: 1100px) {
  .pl-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; scrollbar-width: thin; }
  .pl-tab { padding: 10px 9px 9px; letter-spacing: .04em; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .pl-tab { padding: 10px 6px 9px; letter-spacing: .02em; }
  .pl-count { margin-left: 3px; min-width: 16px; padding: 1px 5px; }
}
.pl-note { margin: 8px 0 4px; font-family: 'Archivo', sans-serif; font-size: 13px; color: var(--pc-navy); }
.pl-stage { display: inline-block; font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--pc-tint); color: var(--pc-muted); white-space: nowrap; }
.pl-stage.is-progress { background: rgba(1,86,150,.12); color: var(--pc-navy); }
.pl-stage.is-closeout { background: var(--pc-gold); color: #3d2e00; }
.pl-stage.is-closed { background: rgba(139,196,63,.22); color: #2c4a12; }
.task-meta.is-warn { color: #7a5a00; font-weight: 700; }
@media (max-width: 640px) {
  .pl-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pl-search { max-width: none; }
}

/* Rows hidden by a filter stay hidden on phones too (the stacked table
   layout sets display on every row, which beat the hidden attribute). */
tr[hidden] { display: none !important; }

/* Mock test jobs page */
.mock-secret { border: 2px solid var(--pc-gold); }
.mock-cred { display: flex; gap: 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--pc-line); flex-wrap: wrap; }
.mock-cred .mini-label { width: 90px; }
.mock-cred code { font-size: 16px; font-family: ui-monospace, Menlo, monospace; background: var(--pc-tint); padding: 3px 8px; border-radius: 4px; user-select: all; overflow-wrap: anywhere; }
.mock-form select, .mock-form input[type=email] { max-width: 460px; }

/* ---------- Mail tracking (USPS scans, stage A1) ---------- */
.mt-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.mt-upload input[type=file] { flex: 1 1 180px; min-width: 0; margin: 0; border: none; padding: 0; background: none; font-size: 13px; }
.mt-item .rel-meta { line-height: 1.5; }
.mt-behalf { margin-top: 14px; border-top: 1px solid var(--pc-line); padding-top: 12px; }
.mt-behalf summary { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--pc-navy); }
.mt-behalf .mt-upload { margin-top: 10px; }
.mt-behalf .mt-upload .mini-label { width: 100%; margin: 0; }
.mt-history { list-style: none; margin: 14px 0 0; padding: 0; font-family: 'Archivo', sans-serif; font-size: 12px; }
.mt-history li { padding: 8px 0; border-top: 1px solid var(--pc-line); overflow-wrap: anywhere; }
.mt-history li span { color: var(--pc-muted); }

.mt-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; margin-bottom: 18px; }
.mt-big { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 44px; line-height: 1; color: var(--pc-navy); }
.mt-big-label { font-family: 'Archivo', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.mt-sub { margin: 2px 0 0; color: var(--pc-muted); font-size: 14px; }
.mt-inhome { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.mt-inhome strong { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 18px; }
.mt-note { color: var(--pc-muted); font-size: 13px; font-style: italic; }
.mt-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mt-stage-top { display: flex; justify-content: space-between; gap: 8px; font-family: 'Archivo', sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--pc-muted); margin-bottom: 6px; }
.mt-stage-top strong { color: var(--pc-ink); font-weight: 800; letter-spacing: 0; }
.mt-bar { height: 8px; background: var(--pc-tint); border-radius: 0 4px 4px 0; overflow: hidden; }
.mt-bar span { display: block; height: 100%; background: var(--pc-navy); border-radius: 0 4px 4px 0; }
.mt-stages li:last-child .mt-bar span { background: var(--pc-green); }
.mt-days { display: flex; gap: 6px; align-items: flex-end; height: 92px; margin: 20px 0 4px; padding-bottom: 18px; position: relative; }
.mt-day { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.mt-col { width: 100%; max-width: 38px; background: var(--pc-navy); opacity: 0.35; border-radius: 3px 3px 0 0; }
.mt-day.is-half .mt-col { opacity: 1; }
.mt-day-label { position: absolute; bottom: -18px; font-family: 'Archivo', sans-serif; font-size: 10px; color: var(--pc-muted); white-space: nowrap; }
.mt-areas { margin-top: 18px; }
.mt-areas .mini-label { margin-bottom: 6px; }
.mt-area { display: grid; grid-template-columns: 40px minmax(0, 1fr) 96px; gap: 10px; align-items: center; padding: 4px 0; font-family: 'Archivo', sans-serif; font-size: 13px; }
.mt-area > span { text-align: right; font-weight: 800; }
.mt-area em { font-style: normal; font-weight: 500; color: var(--pc-muted); font-size: 11px; }
.mt-foot { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--pc-line); color: var(--pc-muted); font-size: 13px; font-style: italic; }
@media (max-width: 640px) {
  .mt-head { grid-template-columns: auto minmax(0, 1fr); }
  .mt-inhome { grid-column: 1 / -1; text-align: left; }
  .mt-stages { grid-template-columns: 1fr; gap: 10px; }
  .mt-big { font-size: 38px; }
}
.mt-demo { margin: 0 0 12px; padding: 9px 12px; border: 1px dashed var(--pc-gold); border-radius: 6px; background: rgba(255,214,0,.08); font-family: 'Archivo', sans-serif; font-size: 12.5px; }
.mt-demo span { color: var(--pc-muted); }

/* ---------- Digital permissions (Performance stage 4A) ---------- */
.dp-checks { display: grid; gap: 8px; margin: 6px 0 4px; }
.dp-check { display: flex; gap: 10px; align-items: flex-start; font-family: 'Archivo', sans-serif; font-size: 13.5px; line-height: 1.35; cursor: pointer; text-transform: none; letter-spacing: normal; font-weight: 500; color: var(--pc-ink); margin: 0; }
.dp-check strong { font-weight: 700; }
.dp-check .help { font-family: 'Lora', serif; font-size: 13px; text-transform: none; letter-spacing: normal; }
.dp-check input { margin: 2px 0 0; width: 16px; height: 16px; flex: 0 0 auto; }
.dp-check.is-off { opacity: .55; cursor: not-allowed; }
.dp-state { display: inline-block; margin-left: 6px; font: 700 10px/1 'Archivo', sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 99px; background: var(--pc-tint); color: var(--pc-muted); vertical-align: 1px; }
.dp-state.is-permitted { background: rgba(139,196,63,.22); color: #2c4a12; }
.dp-state.is-waiting { background: var(--pc-gold); color: #3d2e00; }

/* ---------- Trust and Security page (/security, Wave 1) ---------- */
.topbar-inner .sec-top-link { margin-left: auto; }
.sec-header { margin-bottom: 24px; }
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sec-grid .card + .card { margin-top: 0; }
.sec-card h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 2px solid var(--pc-ink); }
.sec-list { list-style: none; margin: 0; padding: 0; }
.sec-list li { position: relative; padding: 0 0 10px 20px; font-size: 15px; line-height: 1.55; }
.sec-list li:last-child { padding-bottom: 0; }
.sec-list li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--pc-green); }
.sec-honest { margin-top: 18px; border-left: 4px solid var(--pc-navy); }
.sec-honest h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 8px; }
.sec-honest p { margin: 0; font-size: 15px; line-height: 1.55; }
.sec-honest .sec-contact { margin-top: 10px; color: var(--pc-muted); font-size: 14px; }
@media (max-width: 800px) { .sec-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .topbar-inner:has(.sec-top-link) { padding: 14px 16px; gap: 10px; }
  .topbar-inner:has(.sec-top-link) .brand-lockup { width: 168px; height: 48px; }
  .sec-top-link { padding: 8px 12px; font-size: 11px; white-space: nowrap; }
}

/* ---------- Privacy Policy (/privacy) ---------- */
.priv-header { margin-bottom: 24px; }
.priv-header p { max-width: 760px; }
.priv-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.priv-toc { position: sticky; top: 20px; }
.priv-toc-label { font: 700 11px/1 'Archivo', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--pc-muted); margin: 4px 0 10px; }
.priv-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--pc-line, #E4DFD1); }
.priv-toc li a { display: block; padding: 5px 0 5px 12px; font-family: 'Archivo', sans-serif; font-size: 13px; line-height: 1.3; color: var(--pc-ink); text-decoration: none; }
.priv-toc li a:hover { color: var(--pc-navy); text-decoration: underline; }
.priv-body { max-width: 780px; }
.priv-section { scroll-margin-top: 20px; }
.priv-section + .priv-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--pc-line, #E4DFD1); }
.priv-section h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; }
.priv-section p { margin: 0 0 10px; font-size: 15px; line-height: 1.6; }
.priv-section p:last-child { margin-bottom: 0; }
.priv-list { margin: 0 0 10px; }
.priv-list:last-child { margin-bottom: 0; }
.priv-updated { color: var(--pc-muted); font-size: 14px !important; }
@media (max-width: 900px) {
  .priv-layout { grid-template-columns: 1fr; gap: 16px; }
  .priv-toc { position: static; }
  .priv-toc ol { columns: 2; column-gap: 18px; }
}
@media (max-width: 520px) { .priv-toc ol { columns: 1; } }
@media print {
  .priv-toc, .sec-top-link { display: none !important; }
  .priv-layout { display: block; }
  .priv-body { max-width: none; border: none; padding: 0; box-shadow: none; }
  .priv-section { break-inside: avoid-page; }
}

/* ---------- USPS promotions (Wave 1) ---------- */
.promo-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 16px; }
.promo-fields .promo-wide { grid-column: span 2; }
.promo-fields input, .promo-fields select { width: 100%; }
.promo-checks { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 4px 0 14px; }
.promo-table tr.is-off td { opacity: .6; }
.promo-table .promo-edit-row td { padding-top: 0; }
.promo-table .promo-edit-row summary { cursor: pointer; font: 600 12px 'Archivo', sans-serif; color: var(--pc-navy); }
.promo-table .promo-edit-row details[open] { padding: 10px 0 6px; }
.pp-picks { display: grid; gap: 10px; }
.pp-picks select { width: 100%; }
.pp-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 14px; }
.pp-sum strong { font-family: 'Archivo', sans-serif; }
.pp-warn { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--pc-gold); background: var(--pc-tint); font-size: 13.5px; }
.pp-warn div + div { margin-top: 4px; }
.pp-checks { list-style: none; margin: 0 0 12px; padding: 0; }
.pp-checks li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; }
.pp-checks li:last-child { border-bottom: 0; }
.pp-checks .pp-who { display: block; color: var(--pc-muted); font-size: 12.5px; }
.pp-checks form { margin: 0; flex: 0 0 auto; }
@media (max-width: 800px) { .promo-fields { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .promo-fields { grid-template-columns: 1fr; } .promo-fields .promo-wide { grid-column: auto; } }

/* ---------- Informed Delivery (mail tracking A2) ---------- */
.mt-id-note { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--pc-navy); background: var(--pc-tint); font-size: 14px; line-height: 1.5; }
.mt-id-link { display: block; margin: 6px 0; padding: 6px 8px; background: #fff; border: 1px solid var(--pc-line); border-radius: 4px; font-size: 13px; word-break: break-all; user-select: all; }
.mt-id-link-small { font-size: 12px; word-break: break-all; }
@media (max-width: 640px) {
  .pf-minis.id-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pf-minis.id-minis .pf-mini { padding: 12px 14px; }
  .pf-minis.id-minis .pf-mini-value { font-size: 24px; }
}

/* ---------- Touchpoints (Performance stage 4B) ---------- */
.tp-touch { border: 1px solid var(--pc-line); border-radius: var(--radius); padding: 14px 16px; }
.tp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.tp-head form { margin: 0; }
.tp-ready { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; background: var(--pc-tint); border-radius: 6px; font-size: 14px; }
.tp-ready form { margin: 0; }
.tp-num { font: 800 20px/1 'Archivo', sans-serif; }
.tp-handoffs { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13.5px; }
.tp-handoffs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--pc-line); }
.tp-handoffs form { margin: 0; }
.up-next-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pc-line); flex-wrap: wrap; }
.up-next-row:first-of-type { border-top: 0; }
/* 4C: the setup questions and the touch list */
.tp-plan { margin: 0 0 16px; }
.tp-questions { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: tpq; }
.tp-questions li { counter-increment: tpq; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--pc-line); font-size: 14px; }
.tp-questions li > div::before { content: counter(tpq) ". "; font-weight: 700; }
.tp-yn { display: flex; gap: 14px; flex: 0 0 auto; }
.tp-yn label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 14px; text-transform: none; letter-spacing: normal; font-weight: 500; }
.tp-pct { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.tp-pct input { width: 72px; }
.tp-list { display: grid; gap: 10px; }
.tp-touch.is-off { opacity: .72; }
.tp-when { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 8px; font-size: 13.5px; color: var(--pc-muted); }
.tp-day { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.tp-day label { margin: 0; text-transform: none; letter-spacing: normal; font-weight: 500; font-size: 13.5px; color: var(--pc-muted); }
.tp-day input { width: 64px; padding: 4px 6px; }
@media (max-width: 640px) { .tp-questions li { flex-direction: column; gap: 6px; } }
.cd-touches { list-style: none; margin: 0; padding: 0; }
.cd-touches li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pc-line); flex-wrap: wrap; }
.cd-touches li:first-child { border-top: 0; }
.cd-touch-main { display: flex; flex-direction: column; min-width: 0; }
.cd-touch-when { font-size: 13px; color: var(--pc-muted); }
.cd-touch-state { display: flex; align-items: center; gap: 8px; }
.cd-touch-state form { margin: 0; }
/* Email results (Performance stage 4D), on the Digital Plan and Touchpoints. */
.cd-touch-results { flex-basis: 100%; }
.tp-results { margin-top: 10px; }
.tp-link { overflow-wrap: anywhere; }
.er-line { margin: 0; font-size: 13.5px; }
.card p.er-line { max-width: none; }
.er-muted { color: var(--pc-muted); }
.er-note { margin: 4px 0 0; font-size: 12.5px; font-style: italic; }
.er-form { margin-top: 6px; }
.er-form summary { cursor: pointer; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-navy); }
.er-form form { margin-top: 8px; }
.er-help { margin: 0 0 8px; font-size: 13px; color: var(--pc-muted); }
.er-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.er-grid label { display: flex; flex-direction: column; gap: 3px; font-family: 'Archivo', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-muted); }
.er-grid input { width: 100%; min-width: 0; }
@media (max-width: 760px) { .er-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Counting conversions switch (Wave 3b) ---------- */
.pf-counting { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; }
.pf-counting-opts { display: inline-flex; border: 1px solid var(--pc-line); border-radius: 99px; overflow: hidden; background: var(--pc-panel); }
.pf-counting-opts a { padding: 6px 12px; font: 600 12px 'Archivo', sans-serif; color: var(--pc-ink); text-decoration: none; border-left: 1px solid var(--pc-line); }
.pf-counting-opts a:first-child { border-left: 0; }
.pf-counting-opts a.is-on { background: var(--pc-navy); color: #fff; }
.pf-counting-help { flex-basis: 100%; font-size: 12.5px; color: var(--pc-muted); }

/* ---------- Compare Campaigns (Wave 3b) ---------- */
.cmp-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--pc-line); text-align: right; vertical-align: top; font-size: 14px; }
.cmp-table thead th { text-align: right; font-family: 'Archivo', sans-serif; font-size: 13px; }
.cmp-table thead th a { color: var(--pc-ink); font-weight: 800; }
.cmp-table thead th .pill { margin-top: 4px; }
.cmp-table th[scope="row"] { text-align: left; font: 700 11px 'Archivo', sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--pc-muted); white-space: nowrap; }
.cmp-sub { display: block; font-weight: 500; font-size: 12px; color: var(--pc-muted); }
.cmp-table td { font-family: 'Archivo', sans-serif; font-weight: 700; }
.cmp-table td.is-best { background: rgba(139, 196, 63, .14); }
.cmp-best { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: var(--pc-green); color: #1f3308; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
.cmp-missing { font: italic 400 12.5px 'Lora', serif; color: var(--pc-muted); }
.cmp-cards { display: none; }
@media (max-width: 640px) {
  .cmp-wide { display: none; }
  .cmp-cards { display: grid; gap: 12px; }
  .cmp-card { border: 1px solid var(--pc-line); border-radius: var(--radius); padding: 12px 14px; }
  .cmp-card-head { margin-bottom: 6px; }
  .cmp-card-head a { font: 800 15px 'Archivo', sans-serif; color: var(--pc-ink); margin-right: 6px; }
  .cmp-card-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--pc-line); font-size: 13.5px; }
  .cmp-card-row span:first-child { color: var(--pc-muted); }
  .cmp-card-row strong { font-family: 'Archivo', sans-serif; text-align: right; }
  .cmp-card-row.is-best { background: rgba(139, 196, 63, .14); }
}

/* ---------- Segments (Wave 3b) ---------- */
.seg-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; }
.seg-pick select { min-width: 200px; }
.seg-pick .help { flex-basis: 100%; }
.seg-table td .pf-bar { margin-top: 4px; margin-left: auto; max-width: 120px; }
@media (max-width: 640px) {
  .pf-table.seg-table .pf-bar { display: none; }
  .pf-table.seg-table th, .pf-table.seg-table td { padding: 8px 4px; font-size: 12.5px; }
  .pf-table.seg-table th { font-size: 9.5px; white-space: normal; }
  .seg-long { display: none; }
}
@media (min-width: 641px) { .seg-short { display: none; } }

/* ---------- ZIP3 response map (Wave 3b) ---------- */
.geo-map { margin: 0 0 14px; }
.geo-map svg { display: block; width: 100%; height: auto; max-height: 360px; background: var(--pc-tint); border-radius: 6px; }
.geo-states path { fill: #fff; stroke: #CFC8B8; stroke-linejoin: round; }
.geo-dots circle { stroke: #fff; fill-opacity: .9; }
.geo-dots circle:hover { stroke: var(--pc-ink); }
.geo-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font: 500 11.5px 'Archivo', sans-serif; color: var(--pc-muted); }
.geo-legend span { display: inline-flex; align-items: center; gap: 5px; }
.geo-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.geo-legend .geo-size { flex-basis: 100%; }

/* ---------- Demo projects cleanup ---------- */
.demo-list { list-style: none; margin: 0; padding: 0; }
.demo-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pc-line); }
.demo-list li:first-child { border-top: 0; }
.demo-list .dp-check { margin: 0; }

/* ---------- Project pages layout (docs/project-page-layout-handoff.md) ---------- */

/* Two independent column stacks, so a long card on one side never leaves
   a gap on the other. The side column drops below on a phone. */
.layout-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.layout-cols > .col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.layout-cols > .col-side { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.layout-cols .card { margin-top: 0; margin-bottom: 0; }
.col-tools { display: flex; justify-content: flex-end; margin-bottom: -8px; }

/* Collapsible cards (partials/cc-head.ejs, cc-script.ejs) */
.cc { padding-top: 10px; padding-bottom: 10px; }
.cc.is-open { padding-bottom: 22px; }
.cc-h { margin: 0; font-size: inherit; }
.cc-btn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; width: 100%; min-height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.cc-btn:focus-visible { outline: 2px solid var(--pc-navy); outline-offset: 3px; border-radius: 4px; }
.cc-name { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.cc-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.cc-line { font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 600; color: var(--pc-muted); text-align: right; white-space: nowrap; }
.cc-attn .cc-line { color: var(--pc-red); }
.cc-pill { flex-shrink: 0; }
.cc-chev { flex-shrink: 0; width: 8px; height: 8px; margin: 0 4px 0 2px; border-right: 2px solid var(--pc-muted); border-bottom: 2px solid var(--pc-muted); transform: rotate(-45deg); transition: transform .15s; }
.cc-btn[aria-expanded="true"] .cc-chev { transform: rotate(45deg); margin-top: -4px; }
.cc-body { margin-top: 12px; }
.cc-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* Staff header: This Project's numbers and the approver line */
.ph-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ph-stat { border: 1px solid var(--pc-line); border-radius: 8px; padding: 7px 12px; min-width: 92px; background: var(--pc-cream); }
.ph-stat span { display: block; font-family: 'Archivo', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-muted); }
.ph-stat strong { font-family: 'Archivo', sans-serif; font-size: 18px; font-weight: 800; }
.ph-stat strong.is-alert { color: var(--pc-red); }
.ph-approver { font-family: 'Archivo', sans-serif; font-size: 13px; margin-top: 8px; color: var(--pc-muted); }
.ph-approver strong { color: var(--pc-ink); }

/* Data Handling, folded: progress, finished steps tucked away, open steps shown */
.dh-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dh-progress .dh-bar { flex: 1; height: 8px; background: var(--pc-tint); border-radius: 4px; overflow: hidden; }
.dh-progress .dh-bar span { display: block; height: 100%; background: var(--pc-green); }
.dh-progress-label { font-family: 'Archivo', sans-serif; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dh-done-fold { margin: 0 0 6px; }
.dh-done-fold > summary { cursor: pointer; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-navy); padding: 6px 0; }
.dh-done-fold > .custody { margin-top: 8px; }
.dh-open-head { font-family: 'Archivo', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pc-muted); margin: 10px 0 6px; }
.task-done-fold { margin-top: 6px; }
.task-done-fold > summary { cursor: pointer; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-navy); padding: 8px 0; }
.files-more > summary { cursor: pointer; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-navy); padding: 10px 0 2px; }
.files-trim .file-row .file-info { flex: 1; }
.files-trim .file-row .file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 600px) {
  .cc-name { font-size: 14px; }
  .cc-line { font-size: 12px; }
}
/* The task filter hides rows with the hidden attribute, which .task-row's
   display: flex used to override, so done tasks stayed visible. */
.task-row[hidden], .task-edit-wrap[hidden], .task-revision-wrap[hidden] { display: none !important; }

/* Client project page: a slimmer top (docs/project-page-layout-handoff.md) */
.cp-back { margin: 0 0 6px; font-size: 14px; }
.client-title-row .cp-job { margin: 0; }
.cp-desc { margin: 6px 0 0; font-size: 15px; color: var(--pc-muted); }
.terms-strip { font-family: 'Archivo', sans-serif; font-size: 13px; padding: 10px 16px; border: 1px solid var(--pc-line); border-radius: 8px; background: var(--pc-panel); margin: 0 0 18px; }
.terms-strip a { font-weight: 700; }
.terms-strip span { color: var(--pc-muted); }

/* Delivery, folded to its headline on the client page */
.mt-progress { height: 8px; background: var(--pc-tint); border-radius: 4px; overflow: hidden; margin: 12px 0 2px; }
.mt-progress span { display: block; height: 100%; background: var(--pc-green); }
.mt-details > summary { cursor: pointer; display: inline-block; margin-top: 12px; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pc-navy); }
.mt-details[open] > summary { margin-bottom: 12px; }
.mt-areas-more > summary { cursor: pointer; font-family: 'Archivo', sans-serif; font-size: 12px; font-weight: 700; color: var(--pc-navy); padding: 6px 0; }

/* ---------- Admin notes (views/partials/admin-notes.ejs) ---------- */
.an { position: fixed; left: 16px; bottom: 16px; z-index: 60; }
body:has(.pe-save-bar) .an { bottom: 76px; }
.an-fab { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: #1A1A1A; color: #fff; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(26, 26, 26, .18); user-select: none; }
.an-fab::-webkit-details-marker { display: none; }
.an-fab::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: #FFD600; }
.an[open] .an-fab { background: #015696; }
.an-fab-count { background: #C42032; color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; letter-spacing: 0; }
.an-panel { position: absolute; left: 0; bottom: calc(100% + 10px); width: min(380px, calc(100vw - 32px)); max-height: min(70vh, 620px); overflow-y: auto; background: #fff; border: 1px solid #E4DFD1; border-radius: 10px; box-shadow: 0 12px 32px rgba(26, 26, 26, .16); padding: 16px; }
.an-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-family: 'Archivo', sans-serif; font-size: 13px; }
.an-head strong { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.an-head a { color: #015696; font-weight: 600; white-space: nowrap; }
.an-msg { margin: 0 0 10px; font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.an-msg.is-ok { background: #F2F8EA; border-left: 3px solid #8BC43F; }
.an-msg.is-bad { background: #FBEDEE; border-left: 3px solid #C42032; }
.an-form textarea { width: 100%; margin: 8px 0; font-size: 14px; }
.an-kinds { display: flex; gap: 6px; }
.an-kind { margin: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.an-kind input { position: absolute; opacity: 0; pointer-events: none; }
.an-kind span { display: inline-block; font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid #E4DFD1; color: #6E685A; }
.an-kind input:checked + span { background: #1A1A1A; border-color: #1A1A1A; color: #fff; }
.an-kind input:focus-visible + span { outline: 2px solid #015696; outline-offset: 2px; }
.an-empty { margin: 14px 0 0; font-size: 13px; color: #6E685A; font-style: italic; }
.an-list { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid #E4DFD1; }
.an-note { padding: 10px 0; border-bottom: 1px solid #E4DFD1; }
.an-note.is-done { opacity: .6; }
.an-note-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.an-tag { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.an-tag.is-quickfix { background: #8BC43F; color: #1A1A1A; }
.an-tag.is-bug { background: #C42032; color: #fff; }
.an-tag.is-change { background: #015696; color: #fff; }
.an-tag.is-idea { background: #FFD600; color: #1A1A1A; }
.an-meta { font-size: 12px; color: #6E685A; }
.an-body { margin: 6px 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.an-done-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
.an-kinds { flex-wrap: wrap; }
.an-hint { margin: 8px 0 0; font-size: 12px; color: #6E685A; font-style: italic; }
.an-point { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 0; }
.an-point span { flex: 1 1 140px; min-width: 0; font-size: 12px; color: #6E685A; font-style: italic; overflow-wrap: anywhere; }
.an-what { margin: 4px 0; padding: 6px 10px; font-size: 13px; background: #F2F8EA; border-left: 3px solid #8BC43F; border-radius: 6px; overflow-wrap: anywhere; }
.an-pointing, .an-pointing * { cursor: crosshair !important; }
.an-aim { outline: 2px solid #015696 !important; outline-offset: 2px; }
.an-fixed { position: fixed; right: 16px; bottom: 16px; z-index: 61; width: min(380px, calc(100vw - 32px)); padding: 14px 16px; background: #fff; border: 1px solid #E4DFD1; border-left: 4px solid #8BC43F; border-radius: 10px; box-shadow: 0 12px 32px rgba(26, 26, 26, .16); }
.an-fixed p { margin: 0 0 8px; font-size: 14px; }
.an-fixed .an-meta { display: block; margin-top: 2px; }
@media print { .an, .an-fixed { display: none; } }

/* The Notes page (/admin/notes) */
.notes-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.notes-table td { vertical-align: top; }
.notes-table .an-body { margin: 0; }
.notes-table tr.is-done td { opacity: .6; }
