/* Client portal, admin, privacy, and 404 pages. Loads after site.css and uses its tokens. */

.app__main {
  width: var(--shell);
  min-height: 60vh;
  margin-inline: auto;
  padding-block: 64px 96px;
}

.app h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 4.2vw, 3.3rem);
}

.app h2 {
  margin: 56px 0 18px;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.sub {
  max-width: 680px;
  color: var(--body);
  font-size: 1.1rem;
}

.mt-md {
  margin-top: 14px;
}

/* Secondary pages have no menu button, so the short nav stays inline. */
.app .site-header nav {
  display: flex;
  flex-basis: auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  padding: 0;
  font-size: 15px;
}

/* Vertical padding gives the short header links a 44px tap height on phones. */
.app .site-header nav a {
  padding: 10px 0;
  border: 0;
}

.app .site-header nav .nav-contact {
  margin: 0;
  padding: 11px 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

/* Privacy */

.prose {
  max-width: 780px;
}

.prose section {
  padding-block: 28px;
  border-top: 1px solid var(--line);
}

.prose section:first-of-type {
  margin-top: 40px;
}

.prose h2 {
  margin: 0 0 10px;
}

.prose p {
  color: var(--body);
}

.prose a {
  color: var(--pine);
  font-weight: 600;
}

.app-updated {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

/* Projects (portal and admin) */

.proj {
  display: grid;
  gap: 18px 48px;
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.proj h3 {
  margin-bottom: 10px;
}

.proj p {
  color: var(--body);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--body);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-transform: uppercase;
}

.badge[data-s="in_progress"] {
  border-color: var(--pine-mid);
  background: var(--pine-soft);
  color: var(--pine);
}

.badge[data-s="waiting_on_client"] {
  border-color: #e2c48f;
  background: #fbf3e4;
  color: var(--amber);
}

.badge[data-s="complete"] {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--on-pine);
}

.badge[data-t="priority"] {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--on-pine);
}

.badge[data-t="nurture"] {
  border-style: dashed;
  color: var(--muted);
}

.next {
  margin-top: 14px;
  font-weight: 650;
}

.next span {
  color: var(--muted);
  font-weight: 400;
}

.timeline {
  display: grid;
  border-left: 1px solid var(--line-strong);
}

.timeline li {
  position: relative;
  padding: 0 0 18px 18px;
  color: var(--body);
  font-size: 15px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--pine-mid);
  border-radius: 50%;
  background: var(--surface);
}

.timeline time {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.empty {
  max-width: 640px;
  padding: 24px 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--body);
}

/* Leads (admin) */

.lead {
  display: grid;
  gap: 10px 32px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.lead:last-child {
  border-bottom: 1px solid var(--line);
}

.lead h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

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

.lead details summary {
  color: var(--pine);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lead details p {
  margin-top: 10px;
  color: var(--body);
  white-space: pre-wrap;
}

.inline-form {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inline-form > strong {
  color: var(--pine);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app select.small {
  width: auto;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 14px;
}

/* 404 */

.not-found h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
}

@media (min-width: 900px) {
  .proj {
    grid-template-columns: 1.1fr 1fr;
  }
  .lead {
    grid-template-columns: 1.3fr 1fr auto;
    align-items: start;
  }
}

@media (max-width: 740px) {
  .app__main {
    padding-block: 40px 64px;
  }
  /* 16px stops iPhones zooming in when a control is tapped. */
  .app select.small {
    font-size: 16px;
  }
  .proj {
    padding: 22px 20px;
  }
  .site-header .app__who {
    flex-basis: 100%;
  }
}

/* Change or cancel a booked call */

.manage-card {
  max-width: 760px;
  margin-top: 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.manage-card h2 {
  margin: 0 0 6px;
}

.manage-card > p {
  color: var(--body);
}

.manage-card:focus {
  outline: none;
}

.manage-help {
  margin-top: 28px;
}

.btn--danger {
  border-color: var(--error);
  background: var(--error);
  color: #fff;
}

.btn--danger:hover {
  border-color: #912018;
  background: #912018;
  color: #fff;
}

.lead .call-cancel {
  margin-top: 8px;
}
