/* Scoped notebook layout; mobile-first responsive architecture */
.portal-page { background: #f8f6ef; }
.portal-intro { padding: 2rem 0 1.5rem; border-bottom: 1px solid #d8ded7; }
.portal-intro h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0.6rem 0; max-width: 22ch; line-height: 1.2; }
.portal-intro p { max-width: 66ch; }
.portal-intro .breadcrumbs { margin-bottom: 1.25rem; }
.portal-intro .portal-intro-copy { color: #475a52; font-size: 1.05rem; }
.portal-wrap { padding: 2rem 0 4rem; }

/* Mobile-First Layout: Stacked vertically on mobile, 2-column on desktop */
.pup-workspace {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  color: #203b2e;
  width: 100%;
}

@media (min-width: 900px) {
  .pup-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: start;
  }
}

.pup-workspace [hidden] { display: none !important; }
.pup-workspace h2 { font-size: 1.65rem; margin: 0 0 0.7rem; line-height: 1.2; }
.pup-workspace h3 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.pup-workspace p { margin: 0 0 1rem; line-height: 1.65; }
.pup-workspace .portal-kicker { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; margin: 0 0 1rem; color: #53645a; }

.portal-profile {
  background: #ffffff;
  border: 1px solid #d7cdbd;
  border-radius: 12px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: 0 4px 16px rgba(27, 51, 40, 0.05);
}

.portal-portrait {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 8px;
  margin: 0 auto 1.25rem;
  display: block;
}

.portal-photo-empty {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4/3;
  background: #e8ede6;
  color: #3d5c48;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  border-radius: 8px;
  margin: 0 auto 1.25rem;
}

.pup-workspace .portal-profile-caption { color: #53645a; margin-bottom: 0.85rem; font-weight: 600; }
.pup-workspace .portal-fine { font-size: 0.88rem; color: #526159; line-height: 1.6; display: block; margin: 0 0 1rem; clear: both; }

.portal-details { margin: 1.4rem 0; border-top: 1px solid #e2ddd4; padding-top: 1rem; }
.portal-details dt { font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; margin: 0.85rem 0 0.25rem; color: #40574c; }
.portal-details dd { margin: 0; overflow-wrap: anywhere; }

.portal-local-note { border-top: 1px solid #ccd5ca; margin-top: 1.75rem; padding-top: 1.4rem; }
.portal-local-note p { font-size: 0.85rem; color: #526159; }
.portal-local-note .portal-text-button { display: block; text-align: left; }

.portal-main { width: 100%; min-width: 0; }
.portal-main > section + section { border-top: 1px solid #ccd5ca; margin-top: 2.25rem; padding-top: 2.25rem; }
.portal-section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.pup-workspace .portal-count { font-size: 0.8rem; text-align: right; white-space: nowrap; color: #53645a; }
.portal-count strong { display: block; font-size: 2rem; font-weight: 400; line-height: 1.2; color: #203b2e; }

.portal-log-form { max-width: 660px; margin-top: 1.25rem; }
.pup-workspace label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0.9rem 0 0.35rem; }
.pup-workspace label span { color: #5b6b60; font-weight: 400; }
.pup-workspace input, .pup-workspace textarea, .pup-workspace select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  border: 1px solid #a9b7aa;
  border-radius: 6px;
  background: #fffefb;
  color: #203b2e;
  padding: 0.65rem 0.75rem;
  font: inherit;
  box-sizing: border-box;
}
.pup-workspace input[type=file] { font-size: 0.8rem; padding: 0.6rem; }
.pup-workspace textarea { resize: vertical; }
.pup-workspace :focus-visible { outline: 3px solid #8f5e1b; outline-offset: 3px; }

.pup-workspace .button {
  min-height: 48px;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  width: 100%;
  white-space: normal;
  text-align: center;
  justify-content: center;
  word-break: normal;
  display: inline-flex;
  align-items: center;
  position: relative;
  clear: both;
}

.portal-field-pair { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 540px) {
  .portal-field-pair { grid-template-columns: 1fr 1fr; }
}

.portal-profile-editor {
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid #d7cdbd;
  clear: both;
}

.portal-photo-preview { max-width: 140px; max-height: 140px; object-fit: contain; margin: 0.6rem 0; border-radius: 6px; border: 1px solid #ccd5ca; }
.portal-actions { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; }

.portal-text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #24523d;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.4rem 0;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.portal-delete { color: #843224; }
.portal-status { font-size: 0.92rem; color: #24523d; overflow-wrap: anywhere; margin: 0.75rem 0; font-weight: 600; }
.portal-status:empty { display: none; }
.pup-workspace .portal-error { color: #943e24; }

.portal-empty { padding: 1.3rem 0 0.2rem; }
.portal-entry-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.portal-entry-list li { padding: 1.1rem 0; border-bottom: 1px solid #dce1d8; }
.portal-entry-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.portal-entry-heading time { color: #53645a; font-size: 0.82rem; white-space: nowrap; }
.portal-entry-list p { overflow-wrap: anywhere; white-space: pre-wrap; margin: 0.5rem 0 0; }

.portal-resource-links { display: grid; margin-top: 1rem; }
.portal-resource-links a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid #dce1d8;
  font-weight: 600;
  color: #24523d;
  text-decoration: none;
}
.portal-resource-links a:hover { text-decoration: underline; }
