/* Resident resources and partner directory use the maintained colour theme. */
/* Dated community story: shared preview, with a full gallery on Community Work. */
.community-donation {
  background: #f6f0df;
  scroll-margin-top: 110px;
}
.community-donation-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.community-donation-cover {
  margin: 0;
  min-width: 0;
}
.community-donation-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  border-radius: 18px;
}
.community-donation-cover figcaption, .community-donation-gallery figcaption, .community-donation-credit {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}
.community-donation-copy {
  min-width: 0;
}
.community-donation-date {
  font-size: 14px;
  font-weight: 500;
}
.community-donation-copy h2 {
  margin-top: 18px;
}
.community-donation-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.community-donation-gallery figure {
  margin: 0;
  min-width: 0;
}
.community-donation-gallery a {
  display: block;
  border-radius: 12px;
}
.community-donation-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}
.community-donation-credit {
  margin-bottom: 0;
}
@media (max-width: 767px) {
  .community-donation-feature, .community-donation-gallery {
    grid-template-columns: 1fr;
  }
  .community-donation-copy {
    grid-row: 1;
  }
  .community-donation-cover img {
    max-height: none;
  }
}

.resident-activity-section {
  background: linear-gradient(135deg, #fffaf1, #f1f8f4 70%);
}
.resident-activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.resident-activity-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7ded8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgb(38 49 42 / 6%);
}
.resident-activity-art {
  position: relative;
  overflow: hidden;
  background: #f5dfca;
}
.activity-tone-mint .resident-activity-art {
  background: #dcece1;
}
.resident-activity-art > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}
.resident-activity-label {
  position: absolute;
  bottom: 18px;
  left: 22px;
  max-width: calc(100% - 44px);
  padding: 8px 14px;
  border-radius: 30px;
  background: #292929;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.resident-activity-copy {
  padding: 28px;
}
.resident-activity-copy h3 {
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.2;
  margin: 0 0 16px;
}
.resident-activity-copy > p {
  color: var(--muted);
}
.resident-activity-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 32px;
}
.resident-activity-footer p {
  margin: 0;
  font-weight: 500;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .resident-activity-card:hover .resident-activity-art > img {
    transform: scale(1.025);
  }
}
@media (prefers-reduced-motion: reduce) {
  .resident-activity-art > img {
    transition: none;
  }
}
@media (max-width: 767px) {
  .resident-activity-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .resident-activity-copy {
    padding: 24px;
  }
  .resident-activity-label {
    left: 18px;
    bottom: 14px;
  }
}

.directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
  margin: 25px 0;
}

.directory-toolbar label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.directory-toolbar input, .directory-toolbar select {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--control-border);
  border-radius: 4px;
  padding: 12px;
  min-height: 44px;
  max-width: 100%;
}

.directory-toolbar > div {
  flex: 1 1 220px;
}

.directory-toolbar input {
  width: 100%;
}

.referral-directory {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
}

.referral-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px;
  min-width: 0;
}

.referral-card[hidden] {
  display: none;
}

.referral-card h3 {
  font-size: 26px;
}

.referral-card dl {
  margin: 20px 0;
}

.referral-card dt {
  font-weight: 500;
  margin-top: 16px;
}

.referral-card dd {
  margin: 4px 0 0;
}

.referral-card a {
  overflow-wrap: anywhere;
}

.referral-card .small-note {
  margin-top: 18px;
}

.referral-card .button {
  margin-top: 8px;
}

.directory-guidance {
  margin-top: 40px;
}

.page-self-referral .form-guide, .page-professional-referral .form-guide, .page-partner-enquiry .form-guide {
  position: static;
}

.worksheet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.worksheet-nav a {
  border: 1px solid var(--control-border);
  border-radius: 4px;
  padding: 12px 18px;
  color: var(--ink);
}

.worksheet {
  max-width: 900px;
  margin: 40px auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  scroll-margin-top: 120px;
}

.worksheet-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 20px 26px;
  margin-top: 28px;
}

.worksheet .form-field {
  margin: 0;
  min-width: 0;
}

.worksheet .form-field input, .worksheet .form-field textarea {
  width: 100%;
}

.worksheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
}

.worksheet-actions[hidden], .directory-toolbar[hidden] {
  display: none;
}

.worksheet-actions .text-link {
  cursor: pointer;
  font: inherit;
  background: none;
  border: 0;
  padding: 12px;
}

.budget-group {
  min-width: 0;
  border: 1px solid var(--line);
  padding: 20px;
}

.budget-group legend {
  font-weight: 500;
  padding: 0 8px;
}

.budget-group .form-field + .form-field {
  margin-top: 18px;
}

.budget-result {
  grid-column: 1 / -1;
  padding: 20px;
  background: var(--surface);
  border-left: 3px solid var(--button);
}

.worksheet-print {
  display: none;
}

.photo-pending {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 30px;
  border: 1px dashed var(--control-border);
  background: var(--surface);
  text-align: center;
}

.photo-pending .icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  display: block;
}

@media (max-width: 767px) {
  .referral-directory, .worksheet-fields {
    grid-template-columns: 1fr;
  }

  .worksheet {
    padding: 24px 18px;
  }

  .worksheet-actions .button {
    width: 100%;
  }

  .worksheet .form-field textarea, .worksheet .form-field input {
    font-size: 16px;
  }

  .referral-card {
    padding: 24px;
  }

}

@media print {
  .worksheet-nav, .worksheet-actions, .worksheet [data-sheet-status], .directory-toolbar, .worksheet {
    max-width: none;
    border: 0;
    padding: 0;
    margin: 24px 0;
    break-before: page;
  }

  .js .worksheet-fields {
    display: none;
  }

  .js .worksheet-print {
    display: block;
  }

  .worksheet-print > div {
    break-inside: avoid;
    margin: 18px 0;
  }

  .worksheet-print p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .printing-sheet .page-intro, .printing-sheet .note-panel, .printing-sheet .worksheet:not(.print-selected) {
    display: none !important;
  }

  .printing-sheet .worksheet.print-selected {
    break-before: auto;
  }

  .referral-directory {
    display: block;
  }

  .referral-card {
    break-inside: avoid;
    margin-bottom: 20px;
  }

}

/* Shared role clarification stays full-width in split layouts. */
.housing-role-note { grid-column: 1 / -1; }

/* This standalone note follows the page's h1; retain its compact visual size. */
.housing-role-note h2 {
  font-size: clamp(23px, 2vw, 29px);
  line-height: 1.35;
  margin-bottom: 14px;
}
