/* Community journal: shared craft, varied compositions. All colour follows the
   existing four theme palettes. Original photographs remain the primary imagery. */
@media screen {
  :root {
    --experience-radius: 12px;
    --experience-speed: 180ms;
    --experience-ease: cubic-bezier(.2,.7,.2,1);
    --experience-rule: color-mix(in srgb, var(--ornament) 36%, var(--line));
  }
  /* Section artwork lives behind content and is never an interaction target. */
  .ornamented-section { position: relative; isolation: isolate; }
  .ornamented-section > :not(.section-motif) { position: relative; z-index: 1; }
  .section-motif.cultural-art { color: var(--ornament); opacity: .065; z-index: 0; top: auto; translate: none; }
  .section-motif.motif-start { width: 260px; right: auto; left: -70px; bottom: 24px; }
  .section-motif.motif-end { width: 280px; right: 18px; bottom: 24px; }
  .section-motif.motif-frame { width: 230px; right: 0; top: -20px; bottom: auto; opacity: .09; }
  .section-motif.motif-reading { width: 170px; right: 16px; top: 12px; opacity: .035; }
  .logo-feature.ornamented-section { padding: 32px 24px; }
  .logo-feature .logo-badge {
    position: relative;
    width: clamp(190px, 24vw, 270px);
    aspect-ratio: 1;
    border-radius: 50%;
    padding: 24px;
    background: radial-gradient(circle, var(--surface) 60%, var(--surface-2) 100%);
    border: 3px solid var(--ornament);
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--ornament) 20%, transparent), 0 16px 40px -8px color-mix(in srgb, var(--heading) 18%, transparent);
    display: grid;
    place-items: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  .logo-feature .logo-badge:hover {
    transform: scale(1.03);
    box-shadow: 0 0 0 12px color-mix(in srgb, var(--ornament) 28%, transparent), 0 24px 50px -8px color-mix(in srgb, var(--heading) 24%, transparent);
  }
  .logo-feature .logo-badge img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
  }
  .brand .logo-badge {
    padding: 3px !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
  }
  .brand .logo-badge img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }
  .home-invitation .section-motif { opacity: .12; width: 240px; }
  .home-story { border-bottom: 1px solid var(--experience-rule); }
  .home-activities { background-image: linear-gradient(135deg, transparent 64%, color-mix(in srgb, var(--ornament) 5%, transparent)); }
  .home-voices { background-image: radial-gradient(ellipse at 85% 10%, color-mix(in srgb, var(--ornament) 6%, transparent), transparent 65%); }
  .archive-period summary { transition: color var(--experience-speed), padding-inline var(--experience-speed); }
  .archive-period summary:hover { color: var(--link); padding-inline: 8px; }

  /* A catalogued collection, followed by a quiet paper reading surface. */
  .document-toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; margin: 20px 0 28px; background: var(--surface-2); border: 1px solid var(--experience-rule); border-radius: var(--experience-radius); }
  .document-count { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; color: var(--heading); font-weight: 500; }
  .document-count .icon { flex: none; color: var(--kicker); }
  .document-toolbar label { font-size: .8rem; color: var(--muted); }
  .document-page-select { width: auto; min-width: 170px; max-width: 100%; }
  .document-browser .doc-viewer { gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
  .document-page { min-width: 0; margin: 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; scroll-margin-top: 120px; }
  .document-page .poster-btn { display: block; width: 100%; aspect-ratio: 3 / 4; background: var(--surface-2); }
  .document-page .poster-btn img { width: 100%; height: 100%; object-fit: contain; }
  .document-page figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 4px; font-size: .78rem; color: var(--muted); }
  .document-page figcaption .icon { color: var(--link); flex: none; }
  .reading-surface { max-width: 76ch; padding: clamp(24px, 4vw, 56px); background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--ornament); border-radius: 3px 3px var(--experience-radius) var(--experience-radius); box-shadow: 0 12px 32px color-mix(in srgb, var(--heading) 4%, transparent); }
  .reading-surface > p:first-of-type { font-size: 1.08rem; line-height: 1.9; }
  .reading-surface .article-credit { font-style: normal; border-top-style: solid; }
  [data-chapter='documents'] .action-row { margin-bottom: 32px; }
  [data-chapter='documents'] .writing-list, [data-chapter='articles'] .article-people { margin-bottom: 40px; }
  [data-chapter='recognitions'] .recog-scans .poster-btn { padding: 14px; background: var(--surface); border: 1px solid var(--experience-rule); box-shadow: 8px 8px 0 var(--surface-2); }
  [data-chapter='recognitions'] .recog-text > .info-card { border-top: 3px solid var(--ornament); border-radius: 0 0 var(--experience-radius) var(--experience-radius); }

  /* Album contact sheets and an intentional cinema surround for videos. */
  [data-chapter='gallery'][data-page-kind='detail'] .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  [data-chapter='gallery'][data-page-kind='detail'] .photo-grid .photo-btn { aspect-ratio: 4/3; border: 5px solid var(--surface); box-shadow: 0 0 0 1px var(--line); border-radius: 4px; }
  [data-chapter='videos'] .video-frame { background: var(--stage); padding: 12px; border-radius: var(--experience-radius); border: 1px solid var(--experience-rule); box-shadow: 0 18px 40px color-mix(in srgb, var(--stage) 14%, transparent); }
  [data-chapter='videos'] .video-frame :is(video,iframe) { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); border-radius: 6px; }
  [data-page-kind='detail'] .info-card:has(> .share) { background: var(--surface-2); padding-block: 20px; border-inline: 0; border-radius: var(--experience-radius); }
  [data-chapter='events'] .facts .fact, [data-chapter='garba'] .facts .fact { border-top: 2px solid var(--experience-rule); border-radius: 0 0 8px 8px; }
  .person-grid .person {
    border-radius: var(--experience-radius);
    background: var(--surface);
    border: 1px solid var(--experience-rule);
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 18px -4px color-mix(in srgb, var(--heading) 6%, transparent);
    transition: transform var(--experience-speed) var(--experience-ease), box-shadow var(--experience-speed), border-color var(--experience-speed);
  }
  .person-grid .person:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px -8px color-mix(in srgb, var(--heading) 14%, transparent);
    border-color: var(--ornament);
  }
  .person-grid .avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 16px;
    box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--ornament), 0 8px 22px rgba(0,0,0,0.16) !important;
    overflow: hidden;
    transition: transform 0.4s ease;
  }
  .person-grid .person:hover .avatar { transform: scale(1.06); }
  .person h4 { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; color: var(--heading); margin: 0 0 6px; }
  .person p { font-size: 0.82rem; font-weight: 600; color: var(--kicker); text-transform: capitalize; letter-spacing: 0.05em; margin: 0 0 14px; }
  .person-more {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--link);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }
  .person:hover .person-more { background: var(--primary); color: #fff; border-color: var(--primary); }

  .value-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
  }
  .value-list li {
    background: var(--surface);
    border: 1px solid var(--experience-rule);
    border-left: 4px solid var(--ornament);
    border-radius: var(--experience-radius);
    padding: 18px 24px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--heading);
    box-shadow: 0 4px 16px -4px color-mix(in srgb, var(--heading) 6%, transparent);
    transition: transform var(--experience-speed) var(--experience-ease), box-shadow var(--experience-speed);
  }
  .value-list li:hover {
    transform: translateX(4px);
    border-color: var(--ornament);
    box-shadow: 0 8px 22px -4px color-mix(in srgb, var(--heading) 12%, transparent);
  }

  .profile-message { border-radius: 0 var(--experience-radius) var(--experience-radius) 0; }
  .pd-panel { border: 1px solid var(--experience-rule); }
  .pd-top { background: var(--surface-2); }

  /* Grouped search mirrors the compact dialog, with room for longer summaries. */
  .search-box { padding: 14px; background: var(--surface); border: 1px solid var(--experience-rule); border-radius: var(--experience-radius); }
  .search-result-group { margin-top: 36px; }
  .search-result-group > h2 { display: flex; align-items: center; gap: 12px; font: 500 1.1rem var(--font-body); margin-bottom: 18px; }
  .search-result-group > h2 > .icon { color: var(--kicker); flex: none; }
  .result-group-count { margin-left: auto; padding: 3px 10px; color: var(--muted); background: var(--surface-2); border-radius: 20px; font-size: .75rem; }
  .search-result-group .result { padding: 20px; border-radius: 8px; }
  .result > div { min-width: 0; }

  /* Clear choices, an inviting enquiry desk, and readable information panels. */
  .pref-btn:is(.size-sm,.size-md,.size-lg) { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; min-height: 78px; }
  .pref-btn .size-letter { line-height: 1.2; }
  .pref-btn .size-label { font-size: .72rem; line-height: 1.5; font-weight: 500; }
  .display-row { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
  .display-row:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
  .pref-btn[aria-pressed='true'] { box-shadow: inset 0 -3px 0 var(--ornament); }
  .modal-panel { border-top: 3px solid var(--ornament); }
  .contact-top .info-card {
    background: var(--surface);
    border: 1px solid var(--experience-rule);
    border-top: 3px solid var(--ornament);
    border-radius: var(--experience-radius);
    padding: 30px 24px;
    box-shadow: 0 6px 20px -4px color-mix(in srgb, var(--heading) 7%, transparent);
    transition: transform var(--experience-speed) var(--experience-ease), box-shadow var(--experience-speed);
  }
  .contact-top .info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px color-mix(in srgb, var(--heading) 14%, transparent);
  }
  .contact-top .info-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: var(--heading);
    margin-bottom: 14px;
  }
  .contact-top .info-card h3 svg { color: var(--ornament); flex: none; }
  .contact-form-card, .share-card {
    border-radius: var(--experience-radius);
    background: var(--surface);
    border: 1px solid var(--experience-rule);
    border-top: 3px solid var(--ornament);
    box-shadow: 0 8px 28px -6px color-mix(in srgb, var(--heading) 8%, transparent);
  }
  .contact-map-card { min-height: 230px; display: flex; flex-direction: column; justify-content: center; }
  .contact-map-card > .section-motif { width: 180px; right: 5px; top: 15px; opacity: .08; }
  .contact-form-card > h2, .share-card > h2 { padding-bottom: 18px; border-bottom: 1px solid var(--experience-rule); margin-bottom: 24px; }
  .form-note { border-left: 2px solid var(--ornament); padding: 12px 16px; background: var(--surface-2); }
  .field :is(input,textarea,select):focus { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 13%, transparent); }
  .field-error :is(input,textarea) { border-left-width: 3px; }
  [data-chapter='privacy'] .prose { max-width: 900px; margin-inline: auto; }
  .policy-block { padding: 28px 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--experience-radius); }
  .policy-block > h2 { display: flex; align-items: center; gap: 16px; font-size: 1.65rem; margin-top: 0; }
  .policy-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--experience-rule); border-radius: 50%; color: var(--kicker); flex: none; }
  .policy-block ul { margin-bottom: 0; }
  .empty, .state-msg { position: relative; isolation: isolate; max-width: 760px; margin: 24px auto; padding: 44px 28px; border: 1px solid var(--line); border-radius: var(--experience-radius); background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--ornament) 7%, transparent), transparent 70%), var(--surface); }
  .empty-icon { width: 68px; height: 68px; border: 1px solid var(--experience-rule); background: var(--surface-2); box-shadow: 0 0 0 8px color-mix(in srgb, var(--ornament) 4%, transparent); }
  .empty-lost .section-motif { width: 230px; right: 0; top: 0; opacity: .05; }
  .state-title { font: 500 1.6rem/1.5 var(--font-head); max-width: 32ch; color: var(--heading); }
  .alert { border-radius: 8px; }
  .js .splash { background: radial-gradient(ellipse at 50% 42%, color-mix(in srgb, var(--ornament) 10%, transparent), transparent 65%), var(--bg); }
  .splash-badge { outline: 1px solid var(--experience-rule); outline-offset: 14px; box-shadow: 0 12px 44px color-mix(in srgb, var(--heading) 10%, transparent); }
  .splash-name { margin-top: 14px; font-size: clamp(1.3rem, 3vw, 1.65rem); }
  .splash-bar { height: 3px; }

  @media (min-width: 860px) {
    [data-chapter='gallery'][data-page-kind='detail'] .photo-grid .photo-btn:first-child:nth-last-child(n+4) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
  }
  @media (max-width: 859px) {
    [data-chapter='gallery'][data-page-kind='detail'] .photo-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
    .document-toolbar { padding: 18px; }
    .document-count { flex-basis: 100%; }
  }
  @media (max-width: 640px) {
    .section-motif.motif-start { width: 170px; left: -60px; }
    .section-motif.motif-end { width: 180px; right: 0; }
    .home-story > .section-motif { display: none; }
    .document-toolbar { gap: 12px; }
    .document-toolbar label, .document-page-select { flex: 1 1 100%; width: 100%; }
    .document-browser .doc-viewer { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .document-page { padding: 6px; }
    .document-page figcaption { font-size: .72rem; gap: 4px; }
    .search-result-group .result { padding: 16px; gap: 12px; }
    .result img, .result .ph { width: 56px; height: 64px; }
    .policy-block { padding: 24px 20px; }
    .policy-block > h2 { align-items: flex-start; gap: 12px; font-size: 1.35rem; }
    .policy-mark { width: 36px; height: 36px; }
    .empty, .state-msg { padding: 36px 20px; }
    .reading-surface { padding: 24px 20px; }
    .pref-btn .size-label { font-size: .7rem; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .document-page { transition: translate 180ms var(--experience-ease), box-shadow 180ms; }
    .document-page:focus-within, .document-page:hover { translate: 0 -3px; box-shadow: 0 8px 20px color-mix(in srgb, var(--heading) 7%, transparent); }
    .pref-btn { transition: background var(--experience-speed), border-color var(--experience-speed), box-shadow var(--experience-speed); }
    .form-note { animation: note-arrive 220ms ease-out; }
    @keyframes note-arrive { from { translate: 0 4px; } to { translate: 0 0; } }
  }
}
@media print {
  .section-motif, .document-toolbar { display: none !important; }
  .document-page { break-inside: avoid; margin: 0 0 16px; }
  .document-page figcaption { color: #222; }
  .reading-surface, .policy-block { background: none; box-shadow: none; border: 0; padding: 0; }
}
