/* ============================================
   RIGGINS DESIGN + BUILD — Brand System
   ============================================ */

:root {
  /* Brand */
  --navy: #1f3a5f;
  --navy-deep: #16294a;
  --navy-soft: #2a4a73;
  --gold: #b89968;
  --gold-soft: #c9ad7e;
  --bone: #f6f2ec;
  --paper: #faf8f4;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --line: rgba(31, 58, 95, 0.14);

  /* Type */
  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 56px;
  transition: background 0.35s ease, padding 0.35s ease,
    box-shadow 0.35s ease;
}

.nav.is-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0) 100%
  );
}

.nav.is-solid {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 56px;
}

.nav__group {
  display: flex;
  align-items: center;
  gap: 38px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav__group--left {
  justify-content: flex-end;
}

.nav__group--right {
  justify-content: flex-end;
}

.nav__link {
  position: relative;
  color: #fff;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav.is-solid .nav__link {
  color: var(--navy);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__logo {
  cursor: pointer;
  display: block;
  height: 76px;
  padding: 0 24px;
  transition: height 0.3s ease;
}

.nav.is-solid .nav__logo {
  height: 64px;
}

.nav__logo img {
  height: 100%;
  width: auto;
}

.nav__link {
  display: none;
}

.nav__hamburger {
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 8px;
}

.nav.is-solid .nav__hamburger {
  color: var(--navy);
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  width: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__video--crossfade {
  transition: opacity 1.5s ease-in-out;
}

.hero__placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse at center, #2c3e50 0%, #0c1a2a 90%);
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0) 55%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 2;
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14vh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 0 24px;
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.4vw, 4.25rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0 0 36px;
  max-width: none;
  white-space: nowrap;
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.hero__divider {
  width: min(720px, 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 28px;
}

.hero__divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.85);
}

.hero__divider::before,
.hero__divider::after {
  content: none;
}

.hero__divider-dot {
  width: 5px;
  height: 5px;
  background: #fff;
  transform: rotate(45deg);
}

.hero__subtitle {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -36px;
  left: 0;
  width: 1px;
  height: 36px;
  background: #fff;
  animation: scrollDot 2.4s ease-in-out infinite;
}

@keyframes scrollDot {
  0% {
    top: -36px;
  }
  100% {
    top: 36px;
  }
}

/* ============================================
   SECTION COMMON
   ============================================ */

.section {
  padding: 120px 56px;
}

.section--bone {
  background: var(--bone);
}

.section--paper {
  background: var(--paper);
}

.section--navy {
  background: var(--navy);
  color: #fff;
}

.portal-section {
  background: #f9f3e6;
  padding: 64px 24px;
}

.portal-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
}

@media (max-width: 720px) {
  .portal-section {
    padding: 32px 12px;
  }
  .portal-section__inner {
    padding: 8px 8px;
  }
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.eyebrow--navy {
  color: var(--navy);
}

.section__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0;
  color: var(--navy);
}

.section__title--center {
  text-align: center;
}

/* ============================================
   INTRO
   ============================================ */

.intro {
  text-align: center;
  padding: 140px 56px 100px;
}

.intro__lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.4;
  color: var(--navy);
  max-width: 920px;
  margin: 28px auto 0;
  text-wrap: balance;
}

.intro__rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 32px;
}

/* ============================================
   PROJECT STRIP
   ============================================ */

.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 56px 120px;
  max-width: 1480px;
  margin: 0 auto;
}

.strip__card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: pointer;
  background: var(--navy);
}

.strip__card .strip__img {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s ease;
}

.strip__card:hover .strip__img {
  transform: scale(1.04);
}

.strip__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(15, 28, 49, 0.8) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 28px;
}

.strip__card-name {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  letter-spacing: 0.01em;
}

.strip__card-meta {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 6px;
}

/* ============================================
   FEATURE BUBBLES
   ============================================ */

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

.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 44px 36px;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -30px rgba(31, 58, 95, 0.35);
  border-color: rgba(31, 58, 95, 0.3);
}

.feature__num {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin: 0 0 18px;
}

.feature__title {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 16px;
}

.feature__body {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
}

/* ============================================
   CTA BAND
   ============================================ */

.cta {
  background: var(--navy);
  color: #fff;
  padding: 130px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(184, 153, 104, 0.1) 0%,
      transparent 60%
    );
  pointer-events: none;
}

.cta__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 18px;
  position: relative;
}

.cta__subtitle {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 40px;
  position: relative;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  padding: 18px 44px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn--sm {
  font-size: 9px;
  letter-spacing: 0.22em;
  padding: 9px 18px;
}

.admin-projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.admin-projects-header__title {
  margin: 0;
  font-family: var(--serif);
  color: var(--navy);
}
.admin-projects-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-projects-header__link {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.admin-projects-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 36px;
}

.admin-tab-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.punchlist-section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid var(--gold);
}
.punchlist-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.punchlist-section__title {
  margin: 0;
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.25rem;
}
.punchlist-section__hint {
  margin: 6px 0 16px;
  font-size: 0.88rem;
  color: var(--muted);
}
.punchlist-note__area {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  min-height: 160px;
}
.punchlist-note__area:focus {
  outline: 0;
  border-color: var(--gold);
  background: #fffbe9;
}
.punchlist-note__area:read-only {
  background: #f7f7f4;
  cursor: default;
}
.punchlist-note__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.punchlist-note__saved {
  font-size: 0.85rem;
  color: #27ae60;
}

@media (max-width: 640px) {
  .punchlist-section {
    margin-top: 28px;
    padding-top: 22px;
  }
  .punchlist-section__head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .punchlist-section__title {
    font-size: 1.1rem;
  }
  /* Full-width, comfortably tappable add button */
  .punchlist-section__head .btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 11px;
  }
  .punchlist-section__hint {
    font-size: 0.85rem;
  }
  /* 16px text avoids iOS Safari's zoom-on-focus */
  .punchlist-note__area {
    font-size: 16px;
    min-height: 200px;
    padding: 12px;
  }
  .punchlist-note__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .punchlist-note__actions .btn {
    width: 100%;
    padding: 13px 16px;
    font-size: 11px;
  }
  .punchlist-note__saved {
    text-align: center;
  }
  /* Trim nested padding so the upload card isn't cramped on phones */
  .punchlist-section .folder-edit-card {
    padding: 12px;
  }
  /* Two-up punch-list photo thumbnails make better use of phone width */
  .punchlist-section .portal-photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.folder-edit-card {
  background: #fffdf6;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 22px;
}
.folder-edit-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.folder-edit-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.folder-edit-card__row .portal-action-row__delete {
  margin-left: auto;
}

.portal-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.folder-access {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.folder-access__title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
}
.folder-access__hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.folder-access__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.folder-access__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.folder-access__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.92rem;
}
.folder-access__opt:hover {
  background: #faf7ee;
}
.folder-access__opt input {
  accent-color: var(--navy);
}

.documents-page {
  margin-top: 12px;
}
.documents-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.documents-page__head h3 {
  margin: 0;
  font-family: var(--serif);
  color: var(--navy);
}
.documents-page__head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.documents-page__new-folder {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.documents-page__new-folder .form__input {
  flex: 1;
}
.documents-folders {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.documents-folder-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.documents-folder-card:hover {
  background: #faf7ee;
  border-color: var(--gold);
}
.documents-folder-card__icon {
  font-size: 1.4rem;
}
.documents-folder-card__name {
  flex: 1;
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.documents-folder-card__count {
  font-size: 0.82rem;
  color: var(--muted);
}
.documents-folder-card__chev {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1;
}
.documents-page__unfiled {
  margin-top: 16px;
}
.documents-page__unfiled h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* Per-project Files tab — folder navigation */
.file-folders {
  margin-top: 8px;
}
.file-folders__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.file-folders__title {
  margin: 0;
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.file-folders__icon {
  font-size: 1.2rem;
}
.file-folders__count-pill {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: auto;
}
.file-folders__head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.file-folders__rename {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
}
.file-folders__title-button {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  line-height: 1.4;
  transition: background-color 0.15s ease;
}
.file-folders__title-button:hover,
.file-folders__title-button:focus-visible {
  background-color: rgba(184, 153, 104, 0.12);
  outline: none;
}
.file-folders__title-button::after {
  content: '✎';
  margin-left: 4px;
  font-size: 0.85em;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.file-folders__title-button:hover::after,
.file-folders__title-button:focus-visible::after {
  opacity: 0.7;
}
.file-folders__title-input {
  flex: 1;
  min-width: 0;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 4px 10px;
  outline: none;
}
.file-folders__title-input:focus {
  box-shadow: 0 0 0 2px rgba(184, 153, 104, 0.2);
}
.file-folders__saved-flash {
  font-size: 0.78rem;
  color: #1f7a3a;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  animation: file-folders-saved-flash 1.5s ease-out forwards;
}
.file-folders__delete-icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  color: #c0392b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.file-folders__delete-icon-btn:hover,
.file-folders__delete-icon-btn:focus-visible {
  border-color: #c0392b;
  background-color: rgba(192, 57, 43, 0.08);
  outline: none;
}
.file-folders__delete-icon-btn:active {
  background-color: rgba(192, 57, 43, 0.16);
}
@keyframes file-folders-saved-flash {
  0%   { opacity: 0; transform: translateX(-4px); }
  15%  { opacity: 1; transform: translateX(0); }
  75%  { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(0); }
}
.file-folders__loose {
  margin-top: 24px;
}
.file-folders__loose-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.file-folders__hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 6px;
}
.file-folders__new-folder {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.file-folders__new-folder .form__input {
  flex: 1;
  min-width: 200px;
}
/* Drag-drop visual feedback on folder cards */
.documents-folder-card.is-drop-target {
  background: #faf3df;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 153, 104, 0.35);
}

/* Client / Jobsite toggle pill at the top of the Photos tab */
.photo-kind-toggle {
  display: inline-flex;
  background: #f3f1ec;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
  gap: 2px;
}
.photo-kind-toggle__btn {
  background: transparent;
  border: 0;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.photo-kind-toggle__btn:hover {
  color: var(--navy);
}
.photo-kind-toggle__btn.is-active {
  background: #fff;
  color: var(--navy);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Modal overlay used by Manage Clients (and reusable for future modals). */
.portal-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(31, 58, 95, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: portal-modal-fade 0.15s ease-out;
}
.portal-modal__card {
  background: #fff;
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 28px 28px;
  box-shadow: 0 20px 60px rgba(31, 58, 95, 0.3);
  animation: portal-modal-rise 0.18s ease-out;
}
.portal-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.portal-modal__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
}
.portal-modal__close {
  background: transparent;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}
.portal-modal__close:hover,
.portal-modal__close:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  color: var(--navy);
  outline: none;
}
@keyframes portal-modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes portal-modal-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.documents-drop {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.folder-edit-card .documents-drop {
  margin-bottom: 0;
}
.documents-drop.is-active {
  background: #faf2d4;
  border-color: var(--navy);
}
.documents-drop p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.documents-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.documents-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.documents-table tbody td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.documents-table tbody tr:hover {
  background: #faf7ee;
}
.documents-table__actions {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.clients-page {
  margin-top: 12px;
}
.clients-page__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.clients-page__head h3 {
  margin: 0;
}
.clients-page__invite {
  margin-bottom: 28px;
  padding: 18px;
  background: #faf7ee;
  border: 1px dashed var(--gold);
  border-radius: 6px;
}

.clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clients-list__sort {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.clients-list__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.clients-list__row:hover {
  background: #faf7ee;
  border-color: var(--gold);
}
.clients-list__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.clients-list__name-block {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.clients-list__name {
  font-weight: 600;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clients-list__email {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clients-list__counts {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.clients-list__last {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.clients-list__chev {
  font-size: 1.4rem;
  color: var(--muted);
  line-height: 1;
}

.client-detail {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
}
.client-detail__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.client-detail__avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}
.client-detail__name-block h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  color: var(--navy);
}
.client-detail__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.client-detail__section {
  margin-bottom: 24px;
}
.client-detail__section h4 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
}
.client-detail__field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.client-detail__section .client-detail__field:first-of-type {
  border-top: 0;
}
.client-detail__field--editing {
  align-items: flex-start;
}
.client-detail__field--editing .form__input {
  flex: 1 1 260px;
}
.client-detail__field-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  min-width: 80px;
  padding-top: 4px;
}
.client-detail__field-value {
  font-weight: 500;
  color: var(--navy);
  flex: 1;
  padding-top: 4px;
  word-break: break-word;
}
.client-detail__field-value a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.client-detail__field-value a:hover { color: var(--gold); }
.client-detail__field-empty {
  color: var(--muted);
  font-style: normal;
}
.client-detail__field-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.client-detail__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.client-detail__action-msg {
  margin: 12px 0 0;
  padding: 8px 12px;
  background: #f1f8e9;
  border-left: 3px solid #27ae60;
  font-size: 0.85rem;
  color: var(--navy);
}
.client-detail__sig {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px;
  max-width: 280px;
  max-height: 90px;
}
.client-detail__projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-detail__project-link {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 14px;
  background: #fafaf6;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.client-detail__project-link:hover {
  background: #faf7ee;
  border-color: var(--gold);
}
.client-detail__project-link strong {
  color: var(--navy);
  flex-shrink: 0;
}
.client-detail__project-link span {
  font-size: 0.85rem;
  color: var(--muted);
}
.client-detail__project-status {
  margin-left: auto;
  text-transform: lowercase;
}
.client-detail__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}
.client-detail__danger {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.client-detail__hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 640px) {
  .clients-list__row {
    flex-wrap: wrap;
  }
  .clients-list__last,
  .clients-list__counts {
    flex-basis: 100%;
    margin-left: 56px;
  }
}

.btn--solid {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.btn--compact {
  padding: 10px 18px;
  letter-spacing: 0.18em;
  font-size: 10px;
}

.album-download-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.album-download-btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--navy);
}
.album-download-btn:disabled {
  cursor: default;
  border-color: var(--line);
  color: var(--muted);
}
.album-download-btn__progress {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.portal-client-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.portal-client-remove:hover {
  border-color: #c0392b;
  color: #c0392b;
  background: #fdf2f0;
}

.portal-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.portal-action-row .btn {
  flex: 0 0 auto;
}
/* Destructive trash icon, tucked into the Edit form. */
.portal-action-row__delete {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 7px 9px;
  color: #c0392b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.portal-action-row__delete:hover,
.portal-action-row__delete:focus-visible {
  border-color: #c0392b;
  background-color: rgba(192, 57, 43, 0.08);
  outline: none;
}
.portal-action-row__delete:active {
  background-color: rgba(192, 57, 43, 0.16);
}
@media (max-width: 640px) {
  .btn {
    padding: 12px 18px;
    letter-spacing: 0.18em;
    font-size: 10px;
  }
  .btn--compact {
    padding: 9px 14px;
    letter-spacing: 0.14em;
    font-size: 10px;
  }
  .portal-action-row {
    gap: 8px;
  }
}

.btn--solid:hover {
  background: var(--navy-deep);
  color: #fff;
}

.btn.btn--signout:hover,
.btn.btn--solid.btn--signout:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* ============================================
   PHOTO ALBUMS
   ============================================ */

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

.album-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(31, 58, 95, 0.1);
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 3px rgba(31, 58, 95, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31, 58, 95, 0.14);
  border-color: var(--gold);
}

.album-card__cover {
  aspect-ratio: 4 / 3;
  background: #1a1a1a;
  position: relative;
  overflow: hidden;
}

.album-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #9b9381;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #ece4d4;
}

.album-card__body {
  padding: 18px 22px 22px;
  border-top: 1px solid rgba(31, 58, 95, 0.06);
}

.album-card__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 10px;
}

.album-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================
   ACCOUNTING — admin sheet + client ledger
   ============================================ */

/* ---- Admin spreadsheet view ---- */

.accounting-admin__section {
  margin-bottom: 36px;
}

.accounting-admin__section-head {
  margin-bottom: 10px;
}

.accounting-admin__section-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 4px 2px;
  width: 100%;
  max-width: 400px;
}

.accounting-admin__section-title:focus {
  outline: 0;
  border-bottom-color: var(--gold);
}

.accounting-admin__section-title--readonly {
  display: inline-block;
  padding: 4px 2px;
}

.accounting-admin__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.accounting-admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.accounting-admin__table th,
.accounting-admin__table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
}

.accounting-admin__table th:last-child,
.accounting-admin__table td:last-child { border-right: 0; }

.accounting-admin__table th {
  background: #f5efe1;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.accounting-admin__cell {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font: inherit;
  color: var(--ink);
}

.accounting-admin__cell:focus {
  outline: 0;
  background: #fffbe9;
}

.accounting-admin__cell--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.accounting-admin__pct-cell {
  text-align: right;
  white-space: nowrap;
}

.accounting-admin__cell--pct {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  padding: 4px 0;
  width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.accounting-admin__cell--pct:focus {
  outline: 0;
  background: #fffbe9;
}

.accounting-admin__pct-input {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.accounting-admin__pct-suffix {
  color: var(--muted);
  font-size: 0.85rem;
}

.accounting-admin__pct-amount {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.accounting-admin__pct-amount--editable {
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: right;
  width: 100%;
}
.accounting-admin__pct-amount--editable:hover:not(:disabled) {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.accounting-admin__pct-amount--editable:disabled {
  cursor: default;
  opacity: 0.6;
}
.accounting-admin__pct-amount-input {
  display: block;
  width: 100%;
  margin-top: 2px;
  text-align: right;
  font-size: 0.8rem;
}

.accounting-admin__diff {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}

.accounting-admin__diff.is-over   { color: #c0392b; }
.accounting-admin__diff.is-under  { color: #27ae60; }

.accounting-admin__del {
  border: 0;
  background: transparent;
  color: #c0392b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.accounting-admin__del:hover { background: rgba(192, 57, 43, 0.1); }

.accounting-admin__row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.accounting-admin__move {
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.accounting-admin__move:hover {
  background: rgba(31, 58, 95, 0.08);
  color: var(--gold);
}

.accounting-admin__totals td {
  font-weight: 600;
  background: #faf3e3;
  font-size: 0.88rem;
}
.accounting-admin__totals td.is-over   { color: #c0392b; }
.accounting-admin__totals td.is-under  { color: #27ae60; }

.accounting-admin__grand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 32px 0 0;
  padding: 18px 20px;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.accounting-admin__grand-spacer {
  flex: 1;
  border-bottom: 1px dotted rgba(31, 58, 95, 0.3);
  transform: translateY(-4px);
}

.accounting-admin__grand > span:last-child {
  font-variant-numeric: tabular-nums;
}

.accounting-admin__grand .is-over  { color: #c0392b; }
.accounting-admin__grand .is-under { color: #27ae60; }

.accounting-admin__grand--contract {
  margin-top: 12px;
}
.accounting-admin__grand-input {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.02em;
  text-align: right;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font-variant-numeric: tabular-nums;
  width: 320px;
  max-width: 100%;
  outline: none;
  cursor: text;
}
.accounting-admin__grand-input::placeholder {
  color: rgba(31, 58, 95, 0.35);
  font-weight: 500;
}
.accounting-admin__grand-input:hover { color: var(--gold); }
.accounting-admin__grand-input:focus { color: var(--gold); }
.accounting-admin__contract-saving,
.accounting-admin__contract-saved {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 6px;
}
.accounting-admin__contract-saving { color: var(--muted); }

/* ---- Client (read-only) ledger view ---- */

.accounting-ledger {
  font-family: var(--sans);
  color: var(--ink);
}

.accounting-ledger__section {
  margin-bottom: 40px;
}

.accounting-ledger__section-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.02em;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 153, 104, 0.35);
}

.accounting-ledger__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.accounting-ledger__row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(31, 58, 95, 0.06);
}

.accounting-ledger__row:last-child { border-bottom: 0; }

.accounting-ledger__row-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.accounting-ledger__name {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--navy);
  font-weight: 500;
}

.accounting-ledger__leader {
  flex: 1;
  border-bottom: 1px dotted rgba(31, 58, 95, 0.25);
  margin: 0 4px;
  transform: translateY(-4px);
}

.accounting-ledger__diff {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.accounting-ledger__diff.is-over  { color: #c0392b; }
.accounting-ledger__diff.is-under { color: #27ae60; }

.accounting-ledger__detail {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.88rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.accounting-ledger__detail em {
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-right: 4px;
}

.accounting-ledger__checks .accounting-ledger__row {
  padding: 8px 0;
}
.accounting-ledger__checks .accounting-ledger__row-head {
  margin-bottom: 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--navy);
  align-items: baseline;
}
.accounting-ledger__checks .accounting-ledger__name {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy);
}
.accounting-ledger__checks .accounting-ledger__detail {
  font-size: 0.72rem;
  margin-top: 2px;
  margin-bottom: 0;
  gap: 8px;
  color: var(--muted);
}
.accounting-ledger__checks .accounting-ledger__detail em {
  font-size: 0.62rem;
  margin-right: 3px;
}

.accounting-ledger__notes {
  margin: 6px 0 0;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
}

.accounting-ledger__total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 58, 95, 0.14);
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--navy);
}

.accounting-ledger__total > span:first-child {
  font-weight: 500;
  letter-spacing: 0.04em;
}

.accounting-ledger__total > span:last-child {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.accounting-ledger__total .is-over  { color: #c0392b; }
.accounting-ledger__total .is-under { color: #27ae60; }

.accounting-ledger__paid {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 24px;
  padding-top: 14px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
}

.accounting-ledger__paid {
  margin-top: 0;
  padding: 14px 0;
  border-top: 1px solid var(--navy);
}
.accounting-ledger__paid:first-of-type {
  margin-top: 24px;
}
.accounting-ledger__paid > span:first-child { font-weight: 500; letter-spacing: 0.04em; }
.accounting-ledger__paid > span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; }
.accounting-ledger__paid .is-under { color: #27ae60; }

.accounting-ledger__grand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 0;
  padding: 18px 0;
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.accounting-ledger__grand > span:last-child {
  font-variant-numeric: tabular-nums;
}

.accounting-ledger__grand .is-over  { color: #c0392b; }
.accounting-ledger__grand .is-under { color: #27ae60; }

.accounting-ledger__contract-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--navy);
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.accounting-ledger__contract-price > span:last-child {
  font-variant-numeric: tabular-nums;
}

.accounting-admin__contract {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.accounting-admin__contract-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.accounting-admin__contract-input {
  flex: 0 0 auto;
  min-width: 160px;
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}
.accounting-admin__contract-save {
  padding: 8px 18px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.accounting-admin__contract-save[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.accounting-admin__contract-saved { color: #27ae60; }

@media (max-width: 720px) {
  .accounting-ledger__row-head {
    flex-wrap: wrap;
  }
  .accounting-ledger__leader {
    display: none;
  }
  .accounting-ledger__diff {
    margin-left: auto;
  }
  .accounting-ledger__detail {
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   CLIENT PICKER (typeahead with chips)
   ============================================ */

.client-picker {
  position: relative;
}

.client-picker__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.client-picker__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 4px 4px 12px;
  background: var(--navy);
  color: #fff;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.2;
}

.client-picker__chip button {
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
}

.client-picker__chip button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.client-picker__search {
  position: relative;
}

.client-picker__dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(31, 58, 95, 0.14);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 240px;
  overflow-y: auto;
  z-index: 5;
}

.client-picker__dropdown li {
  margin: 0;
}

.client-picker__dropdown li button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--navy);
}

.client-picker__dropdown li button:hover {
  background: #f4ede0;
}

.client-picker__empty {
  padding: 10px 16px;
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

/* ============================================
   PORTAL — PHOTO LIGHTBOX (touch friendly)
   ============================================ */

.portal-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: grid;
  place-items: center;
  z-index: 9999;
  cursor: pointer;
  padding: 0;
}

.portal-lightbox__img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  display: block;
  cursor: default;
  user-select: none;
}
.portal-lightbox__pano {
  width: 96vw;
  height: 92vh;
  background: #000;
  border-radius: 4px;
  cursor: grab;
}
.portal-lightbox__pano:active { cursor: grabbing; }
.portal-photo__pano {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(31, 58, 95, 0.85);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}

.portal-lightbox__loading {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.portal-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.portal-lightbox__counter {
  position: absolute;
  top: 22px;
  left: 22px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  font-family: var(--sans);
  z-index: 2;
}

.portal-lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  color: #fff;
  font-size: 0.85rem;
  padding: 16px 24px 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
  cursor: default;
  pointer-events: none;
}

.portal-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.portal-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.portal-lightbox__nav--prev { left: 12px; }
.portal-lightbox__nav--next { right: 12px; }

@media (max-width: 720px) {
  .portal-lightbox__nav { width: 40px; height: 40px; font-size: 26px; }
  .portal-lightbox__counter { top: 14px; left: 14px; font-size: 0.8rem; }
}

/* ============================================
   PORTAL — MOBILE TWEAKS
   ============================================ */

@media (max-width: 720px) {
  .portal-tabs button {
    padding: 10px 12px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .portal-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  .portal-project-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .portal-project-card {
    padding: 16px 18px;
  }

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

  .album-card__title { font-size: 1.2rem; }
  .album-card__body { padding: 14px 16px 18px; }
  .album-card__meta { font-size: 0.7rem; }

  .btn--signout {
    padding: 12px 22px;
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  /* Tables become stacked cards on phones */
  .portal-table {
    border: 0;
    font-size: 0.95rem;
  }
  .portal-table thead { display: none; }
  .portal-table tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 12px;
  }
  .portal-table tbody td {
    display: block;
    border-bottom: 0;
    padding: 4px 0;
    text-align: left;
  }
  .portal-table tbody td:empty { display: none; }
  .portal-table tbody td .portal-link-btn {
    display: inline-block;
    padding: 8px 0;
    font-weight: 600;
  }
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding: 80px 56px 36px;
  text-align: center;
}

.footer__logo {
  height: 84px;
  margin: 0 auto 36px;
}

.footer__nav {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 36px;
}

.footer__nav a {
  cursor: pointer;
  position: relative;
}

.footer__nav a:hover {
  color: var(--gold);
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 36px;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  transition: background 0.3s ease, color 0.3s ease;
}

.footer__social a:hover {
  background: var(--navy);
  color: #fff;
}

.footer__copy {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================
   PAGE HERO (interior pages)
   ============================================ */

.pagehero {
  position: relative;
  height: 60vh;
  min-height: 460px;
  background: var(--navy);
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
}

.pagehero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.55;
}

.pagehero__pattern {
  position: absolute;
  inset: 0;
  background-image: url("assets/logo-monogram.png");
  background-repeat: repeat;
  background-size: 70px auto;
  opacity: 0.18;
  z-index: 1;
  pointer-events: none;
}

.pagehero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 28, 49, 0.55),
    rgba(15, 28, 49, 0.7)
  );
}

.pagehero__inner {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.pagehero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  letter-spacing: 0.01em;
  margin: 0 0 18px;
}

.pagehero__sub {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
  margin: 0 auto;
}

.pagehero__rule {
  width: 70px;
  height: 1px;
  background: var(--gold);
  margin: 22px auto;
}

/* ============================================
   TEAM (About / Builder Reps)
   ============================================ */

.team {
  display: flex;
  flex-direction: column;
  gap: 140px;
}

.team__row {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 80px;
  align-items: center;
}

.team__row--reverse {
  direction: rtl;
  grid-template-columns: 0.7fr 1.3fr;
}

.team__row--reverse > * {
  direction: ltr;
}

.team__photo {
  aspect-ratio: 4 / 5;
  background-size: cover;
  background-position: center;
  background-color: var(--navy-soft);
  position: relative;
}

.team__photo--circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.team__photo::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.team__photo--circle::after {
  border-radius: 50%;
}

.team__info .eyebrow {
  margin-bottom: 12px;
}

.team__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.6rem);
  color: var(--navy);
  line-height: 1.1;
  margin: 0 0 6px;
}

.team__role {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 24px;
}

.team__rule {
  width: 50px;
  height: 1px;
  background: var(--gold);
  margin: 0 0 24px;
}

.team__bio {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
  color: #3a3a3a;
}

.team__contact {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sans);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--navy);
}

.team__contact span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-right: 10px;
}

.team__contact a,
.contact-meta__value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.team__contact a:hover,
.contact-meta__value a:hover {
  border-bottom-color: currentColor;
}

/* ============================================
   PROJECTS — masonry
   ============================================ */

.masonry {
  column-count: 3;
  column-gap: 24px;
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--navy);
}

.masonry__img {
  width: 100%;
  display: block;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s ease, filter 0.4s ease;
}

.masonry__item:hover .masonry__img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.masonry__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px;
  pointer-events: none;
}

.masonry__name {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.masonry__view {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-soft);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.masonry__item:hover .masonry__view {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 28, 0.94);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 40px;
  animation: lbFade 0.3s ease;
}

@keyframes lbFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__panel {
  width: min(1100px, 100%);
  max-height: 86vh;
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0;
  overflow: hidden;
}

.lightbox__media {
  background: #1a1a1a;
  position: relative;
  height: 86vh;
  overflow: hidden;
}

.lightbox__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__info {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 5;
}

.lightbox__counter {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.lightbox__title {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--navy);
  margin: 0 0 8px;
}

.lightbox__loc {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

.lightbox__desc {
  font-family: var(--sans);
  color: #444;
  line-height: 1.7;
  font-size: 0.95rem;
  flex: 1;
}

.lightbox__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.lightbox__meta dt {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

.lightbox__meta dd {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0;
}

/* ============================================
   CONTACT FORM
   ============================================ */

.form {
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  padding: 64px 56px;
  border: 1px solid var(--line);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

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

.form__field--full {
  grid-column: 1 / -1;
}

.form__label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--navy);
}

.form__input,
.form__textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 14px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
  resize: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--gold);
}

/* A select that actually looks like a dropdown — grey fill, full border,
   chevron icon on the right. Use instead of .form__input on <select>. */
.form__select {
  font-family: var(--sans);
  font-size: 0.95rem;
  padding: 10px 36px 10px 14px;
  background-color: #f3f1ec;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%231f3a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.form__select:hover {
  background-color: #ece8df;
  border-color: var(--gold);
}
.form__select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(184, 153, 104, 0.18);
}

.form__textarea {
  min-height: 130px;
  padding-top: 14px;
}

.form__submit {
  margin-top: 28px;
  width: 100%;
}

.form__sent {
  text-align: center;
  font-family: var(--serif);
  color: var(--navy);
  font-size: 1.5rem;
  padding: 60px 0;
}

.contact-meta {
  margin: 80px auto 0;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  max-width: 1100px;
}

.contact-meta__label {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.contact-meta__value {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.4;
}

/* ============================================
   SPLIT SECTION (AR-style image + card)
   ============================================ */

.split--overlap {
  background: var(--bone);
  padding: 100px 56px;
  position: relative;
}

.split--overlap .split__inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  min-height: 520px;
}

.split--overlap .split__media {
  background-size: cover;
  background-position: center;
  height: 100%;
  min-height: 520px;
  width: 110%;
  margin-left: -10%;
  position: relative;
  z-index: 0;
  order: 2;
}

.split--overlap .split__copy {
  background: #fff;
  padding: 64px 56px;
  position: relative;
  z-index: 2;
  margin-right: -8%;
  box-shadow: 0 30px 80px -40px rgba(31, 58, 95, 0.35);
  order: 1;
  align-self: center;
}

.split--overlap.split--right .split__media {
  width: 110%;
  margin-left: 0;
  margin-right: -10%;
  order: 1;
}

.split--overlap.split--right .split__copy {
  margin-right: 0;
  margin-left: -8%;
  order: 2;
}

.split__copy-inner { max-width: 460px; }

.split__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  line-height: 1.15;
  color: var(--navy);
  margin: 14px 0 22px;
}

.split__body {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.75;
  color: #4a4a4a;
  margin: 0 0 32px;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.arrow-link::before {
  content: '→';
  display: inline-block;
  width: 56px;
  border-top: 1px solid var(--navy);
  text-align: right;
  line-height: 0;
  padding-right: 2px;
  transition: width 0.3s ease;
}

.arrow-link:hover::before { width: 72px; }

/* ============================================
   THE RIGGINS DIFFERENCE — single continuous navy canvas.
   Rows are stacked vertically; each row absolutely-positions a varying
   number of photos + a card. Cards always render LAST and sit on top
   (higher z-index) so text is never hidden.
   ============================================ */

.diff-flow {
  position: relative;
  background: #14283f;
  overflow: hidden;
  padding: 60px 0;
}

/* Logo pattern fades down through the entire canvas, no per-panel breaks */
.diff-flow::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("assets/logo-tile.png");
  background-repeat: repeat;
  background-size: 90px 90px;
  opacity: 0.13;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 100%);
  z-index: 0;
}

/* Subtle gradient sweep that varies the navy down the canvas — no hard seams */
.diff-flow::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 80% 8%, rgba(44, 79, 124, 0.55), transparent 45%),
    radial-gradient(ellipse at 10% 35%, rgba(20, 40, 63, 0.7), transparent 45%),
    radial-gradient(ellipse at 90% 60%, rgba(37, 69, 110, 0.55), transparent 45%),
    radial-gradient(ellipse at 15% 88%, rgba(20, 40, 63, 0.7), transparent 45%);
}

.diff-row {
  position: relative;
  width: 100vw;
  margin: 0;
}

/* ---------- Image base ---------- */
.diff-img {
  position: absolute;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.6);
}
.diff-img__inner {
  position: absolute;
  inset: -12% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transform: translate3d(0, 0, 0) scale(1.18);
}

/* ---------- Card base — ALWAYS on top (z-index 5) ---------- */
.diff-card {
  position: absolute;
  z-index: 5;
  background: #fff;
  padding: 48px 44px;
  width: clamp(360px, 30vw, 460px);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.55);
}
.diff-card__num {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin: 0 0 22px;
}
.diff-card__num i {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--gold);
}
.diff-card__count { color: rgba(31, 58, 95, 0.4); }
.diff-card__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.2vw, 2.2rem);
  line-height: 1.14;
  color: var(--navy);
  margin: 0 0 22px;
  text-wrap: balance;
}
.diff-card__rule {
  width: 56px;
  height: 1px;
  background: var(--gold);
  margin: 0 0 20px;
}
.diff-card__body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: #4a4a4a;
  margin: 0;
}
.diff-card .eyebrow { color: var(--gold); }

/* ============================================
   ROW 1 — TWO photos (big right + small bottom-left), card top-left
   ============================================ */
.diff-row--1 { height: 130vh; }
.diff-img--r1-a { top: 58vh;   left: 6vw;   width: 46vw; height: 38vh; }
.diff-img--r1-b { top: 6vh;    right: -2%;  width: 64vw; height: 64vh; }
.diff-card--r1  { top: 6vh;    left: 6vw; }

/* ============================================
   ROW 2 — THREE photos clustered right, card left side
   ============================================ */
.diff-row--2 { height: 110vh; }
.diff-img--r2-a { top: -8vh;  right: 4vw;   width: 42vw; height: 50vh; }
.diff-img--r2-b { top: 38vh;  left: 28vw;   width: 50vw; height: 44vh; }
.diff-img--r2-c { top: 60vh;  right: -2%;   width: 22vw; height: 28vh; }
.diff-card--r2  { top: -6vh; left: 6vw; width: clamp(520px, 40vw, 620px); padding: 72px 60px; }

/* ============================================
   ROW 3 — ONE big photo, card overlapping top-right corner
   ============================================ */
.diff-row--3 { height: 80vh; }
.diff-img--r3-a { top: 6vh; left: 4vw; width: 70vw; height: 64vh; }
.diff-card--r3  { top: -4vh; right: 4vw; }

/* ============================================
   ROW 4 — TWO photos asymmetric, card center
   ============================================ */
.diff-row--4 { height: 100vh; }
.diff-img--r4-a { top: 8vh;   left: -2%;   width: 50vw; height: 64vh; }
.diff-img--r4-b { top: 4vh; right: 4vw; width: 36vw; height: 42vh; }
.diff-card--r4  { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ============================================
   ROW 5 — split: skinny card left, big photo right
   ============================================ */
.diff-row--5 { height: 60vh; }
.diff-img--r5-a { top: 4vh; bottom: 4vh; left: calc(6vw + clamp(320px, 26vw, 380px)); right: 0; width: auto; height: auto; }
.diff-card--r5  { top: 10vh; bottom: 10vh; left: 6vw; width: clamp(320px, 26vw, 380px); padding: 48px 40px; display: flex; flex-direction: column; justify-content: center; }

/* ============================================
   ROW 6 — ONE big photo, card centered on top
   ============================================ */
.diff-row--6 { height: 110vh; }
.diff-img--r6-a { top: 4vh; left: 2vw; width: 96vw; height: 88vh; }
.diff-card--r6  { bottom: 10vh; left: 6vw; transform: none; width: clamp(440px, 38vw, 560px); padding: 56px 48px; }

/* ============================================
   MOBILE — stack everything: photos first, then card per row
   ============================================ */
@media (max-width: 980px) {
  .diff-flow { padding: 40px 0; }
  .diff-row,
  .diff-row--1, .diff-row--2, .diff-row--3,
  .diff-row--4, .diff-row--5, .diff-row--6 {
    height: auto;
    padding: 30px 22px;
  }
  .diff-img,
  [class*="diff-img--"] {
    position: relative;
    inset: auto !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    width: auto !important;
    height: auto !important;
    aspect-ratio: 16 / 10;
    margin: 0 0 16px;
  }
  .diff-card,
  [class*="diff-card--"] {
    position: relative;
    inset: auto !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    transform: none !important;
    width: auto;
    margin: -50px 12px 0;
    padding: 36px 26px;
  }
}

/* ============================================
   AVAILABLE NOW carousel (navy w/ R pattern)
   ============================================ */

.available {
  position: relative;
  background: #0e2236;
  color: #fff;
  padding: 120px 56px;
  overflow: hidden;
}

.available__pattern {
  position: absolute;
  inset: 0;
  background-image: url("assets/logo-pattern.svg");
  background-repeat: repeat;
  background-size: 280px auto;
  opacity: 0.05;
  pointer-events: none;
}

.available__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
  position: relative;
  z-index: 1;
  align-items: stretch;
  min-height: 560px;
}

.available__panel {
  background: var(--bone);
  color: var(--ink);
  padding: 64px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.available__eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 18px;
}

.available__title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 2.6vw, 2.4rem);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 22px;
}

.available__body {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin: 0 0 24px;
}

.available__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.available__nav button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
}

.available__nav button:hover { background: var(--navy); color: #fff; }

.available__counter {
  font-family: var(--serif);
  font-size: 1.05rem;
}

.available__counter b { font-weight: 500; color: var(--navy); }
.available__counter span { color: var(--muted); }

.available__media {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: #000;
}

@media (max-width: 980px) {
  .available { padding: 70px 22px; }
  .available__inner { grid-template-columns: 1fr; min-height: 0; }
  .available__media { aspect-ratio: 4/3; }
  .available__panel { padding: 36px 28px; }
}

/* ============================================
   TESTIMONIAL band
   ============================================ */

.quote {
  background: var(--paper);
  padding: 110px 56px;
}

.quote__panel {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  background: #14283f;
  color: #fff;
  padding: 70px 56px;
}

.quote__mark {
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--gold);
  margin: 0 0 18px;
}

.quote__text {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-style: italic;
  line-height: 1.45;
  margin: 0 0 26px;
  text-wrap: balance;
}

.quote__attr {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

@media (max-width: 980px) {
  .quote { padding: 70px 22px; }
  .quote__panel { padding: 48px 24px; }
}

@media (max-width: 980px) {
  .nav { padding: 14px 22px; grid-template-columns: auto 1fr; }
  .nav.is-solid { padding: 10px 22px; }
  .nav__group--left { display: none; }
  .nav__group--right { display: flex; justify-content: flex-end; gap: 0; }
  .nav__group--right .nav__link { display: none; }
  .nav__hamburger { display: grid; place-items: center; color: #fff; }
  .nav.is-solid .nav__hamburger { color: var(--navy); }
  .nav__logo { height: 44px; padding: 0; justify-self: start; }

  .drawer { width: 100%; }
  body.drawer-open { padding-right: 0; }
  body.drawer-open .nav { right: 0; }

  .section { padding: 80px 22px; }
  .strip { grid-template-columns: 1fr; padding: 0 22px 80px; }
  .features { grid-template-columns: 1fr; }
  .footer { padding: 60px 22px 28px; }
  .footer__nav { gap: 22px; }
  .form { padding: 36px 22px; }
  .form__row { grid-template-columns: 1fr; gap: 18px; }
  .team__row, .team__row--reverse { grid-template-columns: 1fr; gap: 36px; direction: ltr; }
  .team { gap: 80px; }
  .masonry { column-count: 1; column-gap: 0; }
  .masonry__item { margin-bottom: 12px; }
  .masonry__img { aspect-ratio: 4 / 3 !important; }
  .masonry__caption { padding: 18px 20px; }
  .masonry__name { font-size: 1.15rem; }
  .masonry__view { opacity: 1; transform: none; }
  .lightbox__panel { grid-template-columns: 1fr; max-height: 92vh; overflow: auto; }
  .lightbox__media { height: 60vh; }
  .lightbox__info { padding: 28px; }
  .contact-meta { grid-template-columns: 1fr; gap: 28px; }
  .pagehero { height: 50vh; min-height: 360px; }
  .hero__content { bottom: 12vh; }
}

/* Nav drawer */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 340px;
  background: var(--navy);
  color: #fff;
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 80px 32px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.drawer.is-open {
  transform: translateX(0);
}

/* Desktop: shift the page content to make room for the drawer */
body {
  transition: padding-right 0.4s ease;
}
body.drawer-open {
  padding-right: 340px;
  overflow-x: hidden;
}
.nav {
  transition: background 0.35s ease, padding 0.35s ease,
    box-shadow 0.35s ease, right 0.4s ease;
}
body.drawer-open .nav {
  right: 340px;
}

.drawer__close {
  position: absolute;
  top: 22px;
  right: 22px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 40px;
}

.drawer__nav a {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
  align-self: flex-start;
  padding: 4px 0;
  transition: transform 0.25s ease, color 0.2s ease;
}

.drawer__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}

.drawer__nav a:hover {
  transform: translateX(6px);
  color: var(--gold);
}

.drawer__nav a:hover::after {
  transform: scaleX(1);
}

/* ============================================
   CLIENT PORTAL
   ============================================ */
.portal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.portal-tabs button {
  background: transparent;
  border: 0;
  padding: 12px 18px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.portal-tabs button.is-active {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.portal-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.portal-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
  border-radius: 4px;
}
.portal-photo.is-selectable { cursor: pointer; }
.portal-photo.is-selected { outline: 3px solid var(--gold); outline-offset: -3px; }
.portal-photo__check {
  position: absolute;
  top: 6px; left: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--gold);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.portal-photo__check.is-active {
  background: var(--gold);
  color: #fff;
}
.portal-photo__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 0.78rem;
  padding: 28px 12px 10px;
}
.portal-photo__del {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.portal-photo__cover-btn {
  position: absolute;
  top: 6px; right: 40px;
  width: 28px; height: 28px;
  padding: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: rgba(255,255,255,0.7);
  border: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.portal-photo__cover-btn:hover { color: var(--gold); }
.portal-photo__cover-btn.is-active {
  background: var(--gold);
  color: #fff;
}
.portal-photo__cover-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: var(--gold);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.95rem;
}
.portal-table th,
.portal-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.portal-table th {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.portal-link-btn {
  background: transparent;
  border: 0;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.portal-link-btn:hover { color: var(--gold); }

.upload-progress {
  margin-top: 14px;
  margin-bottom: 4px;
}
.upload-progress__bar {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress__fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.25s ease;
}
.upload-progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.file-upload__drop {
  margin-top: 18px;
  border: 2px dashed var(--line);
  border-radius: 6px;
  padding: 24px 18px;
  text-align: center;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-upload__drop.is-active {
  border-color: var(--gold);
  background: #fdf9ee;
}
.file-upload__drop-text {
  margin: 0 0 6px;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.9rem;
}
.file-upload__queue {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  text-align: left;
  border-top: 1px solid var(--line);
}
.file-upload__queue li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.88rem;
}
.file-upload__queue li > span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-upload__queue-size {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.file-upload__queue-remove {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.file-upload__queue-remove:hover {
  border-color: #c0392b;
  color: #c0392b;
}

.file-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.file-group__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.file-group__count {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--line);
  padding: 2px 8px;
  border-radius: 999px;
}

.portal-change-password {
  font-size: 0.65rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.portal-change-password:hover { color: var(--navy); }

.portal-project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.portal-project-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.portal-project-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.portal-project-card.is-archived {
  background: #f7f5ee;
  opacity: 0.85;
}
.portal-project-card.is-archived strong { color: var(--muted); }

.portal-project-card__members {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.portal-project-card__members li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.portal-project-card__member-name {
  font-family: var(--sans);
  color: var(--navy);
}
.portal-project-card__member-login {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.login-never {
  color: #c0392b;
  font-weight: 700;
  margin-left: 4px;
}
.login-ok {
  color: #27ae60;
  font-weight: 700;
  margin-left: 4px;
}
.portal-project-card strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--navy);
}
.portal-project-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.portal-project-card__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  row-gap: 6px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.admin-tabs__tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.admin-tabs__tab:hover { color: var(--navy); }
.admin-tabs__tab.is-active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.admin-financials__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.admin-financials__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.admin-financials__card-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-financials__card-amount {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--navy);
}
.admin-financials__card-amount.is-negative { color: #c0392b; }
.admin-financials__card-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.admin-financials__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.admin-financials__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.92rem;
  background: #fff;
}
.admin-financials__table th,
.admin-financials__table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.admin-financials__table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #faf7ee;
}
.admin-financials__table tr:last-child td { border-bottom: none; }
.admin-financials__totals td {
  font-weight: 600;
  background: #faf7ee;
}
.admin-financials__table .is-negative { color: #c0392b; }
.admin-financials__table .is-positive { color: #27ae60; }
.admin-financials__card-amount.is-positive { color: #27ae60; }
.admin-financials__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  margin-bottom: 18px;
}
.admin-financials__snapshot-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.admin-financials__view-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-financials__view-select {
  padding: 6px 10px;
  font-family: var(--sans);
  font-size: 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  min-width: 160px;
}
.admin-financials__view-btn {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.admin-financials__view-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.admin-financials__view-btn--danger { color: #c0392b; }
.admin-financials__view-btn--danger:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.admin-financials__restore {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.admin-financials__restore:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.admin-financials__toggle {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 1;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.admin-financials__toggle:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.admin-financials__table tr.is-excluded td {
  color: #b5aea0;
  text-decoration: line-through;
}
.admin-financials__table tr.is-excluded .admin-financials__toggle {
  text-decoration: none;
  border-color: var(--gold);
  color: var(--gold);
}

.progress-donut {
  flex-shrink: 0;
}
.progress-donut__track {
  stroke: #e6e1d3;
}
.progress-donut__fill {
  stroke: var(--gold, #b78a3a);
  transition: stroke-dashoffset 0.4s ease;
}
.progress-donut__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  fill: var(--navy);
}

/* ---- Selections sheet ---- */
.selections-sheet {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--sans);
}
.selections-sheet__intro {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.92rem;
}
.selections-phase {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.selections-phase.is-locked {
  opacity: 0.8;
  background: #f7f5ee;
}
.selections-phase.is-locked.is-open {
  opacity: 1;
  background: #fff;
}
.selections-phase__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.selections-phase__head:hover {
  background: #faf7ee;
}
.selections-phase.is-locked .selections-phase__head:hover {
  background: #ebe6d4;
}
.selections-phase__num {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}
.selections-phase__title {
  flex: 1;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
}
.selections-phase__badge {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #27ae60;
  font-weight: 600;
  border: 1px solid #27ae60;
  border-radius: 999px;
  padding: 3px 10px;
}
.selections-phase__toggle {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 300;
}
.selections-phase__body {
  padding: 0 22px 24px;
  border-top: 1px solid var(--line);
}
.selections-phase__desc {
  margin: 18px 0 24px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.selections-section {
  margin-bottom: 28px;
}
.selections-section__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.selections-section__note {
  margin: 6px 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}
.selections-section__subtitle {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--navy);
  margin: 6px 0 0;
  padding: 4px 0 0;
  border-top: 1px dashed var(--line);
  letter-spacing: 0.04em;
}
.selections-field--dim,
.selections-field--dim .selections-field__label {
  opacity: 0.45;
}
.selections-field--dim .selections-field__input,
.selections-field--dim .selections-field__textarea {
  background: #f3f1ec;
}
.selections-section__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px 24px;
  margin-top: 14px;
}

.selections-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
}
.selections-field--full {
  grid-column: 1 / -1;
}
.selections-field--check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--navy);
}
.selections-field--check input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}
.selections-field__label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
}
.selections-field__input,
.selections-field__textarea {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
.selections-field__textarea {
  resize: vertical;
  min-height: 60px;
}
.selections-field__input:focus,
.selections-field__textarea:focus {
  outline: 0;
  border-color: var(--gold);
  background: #fffbe9;
}
.selections-field__input:disabled,
.selections-field__textarea:disabled {
  background: #f7f7f4;
  color: var(--ink);
  cursor: default;
}
.selections-field__radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.selections-field__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
}
.selections-field__radio input {
  accent-color: var(--navy);
}
.selections-field__radio input:disabled + span {
  color: var(--muted);
}
.selections-field__clear {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.selections-field__clear:hover { color: var(--gold); }

.selections-signature {
  margin-top: 32px;
  padding: 22px;
  background: #faf7ee;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.selections-signature.is-signed {
  border-style: solid;
  border-color: #27ae60;
  background: #dcefe2;
}
.selections-signature__line {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.selections-signature__line-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
}
.selections-signature__line-rule {
  display: block;
  height: 1px;
  background: var(--navy);
  width: 100%;
  max-width: 360px;
  margin-top: 28px;
}
.selections-signature__stamp {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.selections-signature__name {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--navy);
  font-style: italic;
}
.selections-signature__meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.selections-phase__pdf {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.selections-phase__pdf .pdf-button {
  font-size: 0.65rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.selections-phase__pdf .pdf-button:hover {
  color: var(--navy);
}

.selections-sign-modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 41, 74, 0.55);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}
.selections-sign-modal__card {
  background: #fff;
  padding: 32px;
  border-radius: 6px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}
.selections-sign-modal__card h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  color: var(--navy);
}
.selections-sign-modal__card p {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.selections-signature__img {
  display: block;
  max-width: 220px;
  max-height: 70px;
  margin-bottom: 4px;
  background: transparent;
}

.sign-method {
  margin-top: 16px;
}
.sign-method__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 8px;
}
.sign-method__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sign-method__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  cursor: pointer;
}
.sign-method__opt.is-disabled {
  color: var(--muted);
  cursor: not-allowed;
}
.sign-method__opt input {
  accent-color: var(--navy);
}
.sign-method__hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}
.sign-method__preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafaf6;
  display: flex;
  justify-content: center;
}
.sign-method__preview img {
  max-width: 100%;
  max-height: 90px;
}
.sign-method__pad {
  margin-top: 14px;
}

.signature-pad {
  border: 1px dashed var(--gold);
  border-radius: 6px;
  background: #fffdf6;
  padding: 16px;
}
.signature-pad__frame {
  position: relative;
  background: #fff;
  border: 2px solid var(--navy);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(31, 58, 95, 0.12);
}
.signature-pad__frame::before {
  content: '';
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 32px;
  border-top: 1px dashed rgba(31, 58, 95, 0.25);
  pointer-events: none;
}
.signature-pad__canvas {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: crosshair;
  touch-action: none;
}
.signature-pad__cue {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(31, 58, 95, 0.5);
  pointer-events: none;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.signature-pad__cross {
  font-size: 1.6rem;
  line-height: 1;
  color: rgba(31, 58, 95, 0.45);
  font-weight: 300;
}
.signature-pad__hint {
  font-weight: 600;
}
.signature-pad__actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  justify-content: flex-end;
}
.signature-pad__link {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.signature-pad__link:hover:not(:disabled) {
  color: var(--gold);
}
.signature-pad__link:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}
.signature-saved {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafaf6;
  margin-bottom: 14px;
}
.signature-saved__label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 600;
}
.signature-saved__img {
  max-width: 240px;
  max-height: 90px;
  background: #fff;
  padding: 4px;
}

.account-page {
  max-width: 720px;
  margin: 0 auto;
}
.account-section {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.account-section:last-child {
  border-bottom: 0;
}
.account-section h3 {
  font-family: var(--serif);
  color: var(--navy);
  margin: 0 0 16px;
}
.account-section__hint {
  margin: -8px 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
}
.account-section--danger {
  display: flex;
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .selections-phase__head {
    padding: 14px 16px;
    flex-wrap: wrap;
  }
  .selections-phase__title {
    font-size: 1.1rem;
  }
  .selections-phase__body {
    padding: 0 16px 20px;
  }
  .selections-section__fields {
    grid-template-columns: 1fr;
  }
}
