:root {
    --paper: #fbfcfa;
    --paper-warm: #f4f2ed;
    --white: #ffffff;
    --ink: #253334;
    --ink-soft: #5a6665;
    --teal: #4f9497;
    --teal-deep: #2f7478;
    --teal-pale: #dcebec;
    --sage: #cddbd2;
    --sage-pale: #edf3ef;
    --line: #d9e1de;
    --danger: #9b4141;
    --shadow: 0 24px 65px rgba(37, 51, 52, 0.10);
    --shadow-small: 0 12px 32px rgba(37, 51, 52, 0.08);
    --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --shell: 1240px;
    --radius: 18px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

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

[hidden] {
    display: none !important;
}

img {
    height: auto;
}

a {
    color: var(--teal-deep);
    text-underline-offset: 0.2em;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #0d6f77;
    outline-offset: 4px;
}

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin-inline: auto;
}

.section {
    padding-block: clamp(72px, 9vw, 132px);
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    transform: translateY(-160%);
    border-radius: 6px;
    background: var(--ink);
    color: var(--white);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(47, 116, 120, 0.12);
    background: rgba(251, 252, 250, 0.96);
}

.site-header__inner {
    display: flex;
    min-height: 106px;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.memorial-mark {
    display: inline-flex;
    flex-direction: column;
    color: var(--ink);
    line-height: 1;
    text-decoration: none;
}

.memorial-mark__eyebrow {
    margin-bottom: 7px;
    color: var(--teal-deep);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.memorial-mark__name {
    font-family: var(--serif);
    font-size: clamp(1.55rem, 3vw, 2.05rem);
    letter-spacing: 0.04em;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: clamp(24px, 5vw, 58px);
}

.public-nav a {
    position: relative;
    padding-block: 15px;
    color: var(--ink-soft);
    font-size: 0.96rem;
    font-weight: 650;
    text-decoration: none;
}

.public-nav a::after {
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: var(--teal);
    content: "";
    transition: transform 180ms ease;
}

.public-nav a:hover,
.public-nav a[aria-current="page"] {
    color: var(--teal-deep);
}

.public-nav a:hover::after,
.public-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.flash-region {
    position: relative;
    z-index: 10;
}

.flash {
    margin-top: 20px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    box-shadow: var(--shadow-small);
    color: var(--ink);
}

.flash--success {
    border-color: #8ab7a1;
    background: #eef8f1;
}

.flash--error {
    border-color: #d49b9b;
    background: #fff3f3;
    color: #6f2828;
}

.flash--info {
    border-color: #93b9bd;
    background: #eef7f8;
}

.eyebrow {
    margin: 0 0 13px;
    color: var(--teal-deep);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.1;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.75rem, 6.3vw, 5.85rem);
}

h2 {
    font-size: clamp(2.2rem, 4.6vw, 4.35rem);
}

h3 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border: 1px solid var(--teal-deep);
    border-radius: 999px;
    background: var(--teal-deep);
    box-shadow: none;
    color: var(--white);
    cursor: pointer;
    font-size: 0.91rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
    border-color: var(--ink);
    background: var(--ink);
    transform: translateY(-2px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.65;
    transform: none;
}

.button--light {
    border-color: var(--white);
    background: var(--white);
    color: var(--teal-deep);
}

.button--light:hover {
    border-color: var(--white);
    background: transparent;
    color: var(--white);
}

.button--small {
    min-height: 42px;
    padding: 8px 19px;
}

.button--secondary {
    border-color: var(--teal-deep);
    background: transparent;
    color: var(--teal-deep);
}

.button--danger {
    border-color: var(--danger);
    background: var(--danger);
}

.hero {
    display: grid;
    min-height: 740px;
    grid-template-columns: minmax(330px, 0.9fr) minmax(390px, 1.1fr);
    align-items: center;
    gap: clamp(55px, 8vw, 118px);
    padding-block: clamp(70px, 10vw, 138px);
}

.hero__portrait {
    position: relative;
    width: min(100%, 540px);
    justify-self: end;
}

.hero__portrait::before {
    position: absolute;
    z-index: -1;
    top: -30px;
    right: 54px;
    bottom: 42px;
    left: -34px;
    border: 1px solid var(--sage);
    content: "";
}

.hero__portrait::after {
    position: absolute;
    z-index: -2;
    right: -54px;
    bottom: -46px;
    width: 58%;
    height: 48%;
    background: var(--teal-pale);
    content: "";
}

.hero__portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.hero__frame {
    position: absolute;
    right: -24px;
    bottom: -25px;
    width: 94px;
    height: 94px;
    border-right: 8px solid var(--teal);
    border-bottom: 8px solid var(--teal);
}

.hero__content {
    max-width: 650px;
}

.hero h1 {
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--teal-deep);
    font-style: italic;
}

.memorial-dates {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0 0 28px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hero blockquote {
    margin: 0 0 25px;
    padding: 0 0 0 22px;
    border-left: 2px solid var(--sage);
}

.hero blockquote p {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-style: italic;
    line-height: 1.5;
}

.hero blockquote cite {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-style: normal;
}

.hero__intro {
    max-width: 590px;
    margin: 0 0 15px;
    color: var(--ink-soft);
    font-size: 1.06rem;
    line-height: 1.85;
}

.editable-note {
    margin: 0 0 28px;
    color: #6c7876;
    font-size: 0.76rem;
    font-style: italic;
}

.about-section {
    position: relative;
    overflow: hidden;
    border-block: 1px solid var(--line);
    background: var(--sage-pale);
}

.about-section::after {
    position: absolute;
    top: 7%;
    right: -120px;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(79, 148, 151, 0.22);
    border-radius: 50%;
    content: "";
}

.about-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr);
    align-items: center;
    gap: clamp(58px, 9vw, 130px);
}

.about-grid__visual {
    max-width: 430px;
}

.about-image {
    position: relative;
}

.about-image::before {
    position: absolute;
    top: 24px;
    right: -25px;
    bottom: -25px;
    left: 24px;
    border: 1px solid var(--teal);
    content: "";
}

.about-image img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: var(--shadow-small);
}

.about-image__caption {
    position: relative;
    margin: 49px 0 0 24px;
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.55;
}

.about-grid__copy h2 {
    margin-bottom: 35px;
    color: var(--teal-deep);
}

.about-grid__copy > p:not(.eyebrow, .editable-note) {
    margin: 0 0 18px;
    color: #455352;
    line-height: 1.82;
}

.about-grid__copy .editable-note {
    margin-top: 30px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(300px, 0.85fr);
    align-items: end;
    gap: 60px;
    margin-bottom: clamp(38px, 6vw, 72px);
}

.section-heading h2 {
    margin-bottom: 0;
    color: var(--teal-deep);
}

.section-heading > p {
    max-width: 570px;
    margin: 0;
    color: var(--ink-soft);
}

.photo-gallery {
    display: grid;
    min-height: 660px;
    grid-template-columns: 1.22fr 0.78fr;
    grid-template-rows: 1fr 1fr;
    gap: 18px;
}

.photo-gallery__item {
    position: relative;
    overflow: hidden;
    background: var(--teal-pale);
    color: var(--white);
    text-decoration: none;
}

.photo-gallery__item--1 {
    grid-row: 1 / 3;
}

.photo-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease, filter 450ms ease;
}

.photo-gallery__item span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 42px 22px 18px;
    background: linear-gradient(transparent, rgba(25, 43, 44, 0.78));
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 220ms ease, transform 220ms ease;
}

.photo-gallery__item:hover img {
    filter: saturate(0.82);
    transform: scale(1.025);
}

.photo-gallery__item:hover span,
.photo-gallery__item:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.closing-tribute {
    background: var(--teal-deep);
    color: var(--white);
    text-align: center;
}

.closing-tribute__inner {
    max-width: 870px;
}

.closing-tribute .eyebrow {
    color: #c9e5e3;
}

.closing-tribute h2 {
    margin-bottom: 25px;
}

.closing-tribute p:not(.eyebrow) {
    max-width: 720px;
    margin: 0 auto 34px;
    color: #e6f0ef;
    font-size: 1.08rem;
}

.page-intro {
    max-width: 910px;
    padding-top: clamp(70px, 9vw, 122px);
    padding-bottom: clamp(42px, 6vw, 75px);
    text-align: center;
}

.page-intro h1 {
    margin-bottom: 24px;
    color: var(--teal-deep);
}

.page-intro > p:last-child {
    max-width: 760px;
    margin: 0 auto;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

.memory-submit-section {
    padding-bottom: clamp(70px, 9vw, 120px);
}

.memory-form-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.68fr) minmax(430px, 1.32fr);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow);
}

.memory-form-card__intro {
    padding: clamp(35px, 5vw, 66px);
    background: var(--teal-deep);
    color: var(--white);
}

.memory-form-card__intro .eyebrow {
    color: #c8e2e2;
}

.memory-form-card__intro h2 {
    margin-bottom: 24px;
    font-size: clamp(2.2rem, 4vw, 3.65rem);
}

.memory-form-card__intro > p {
    color: #e3eeee;
}

.privacy-note {
    margin-top: 36px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.23);
}

.privacy-note strong {
    font-size: 0.77rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.privacy-note p {
    margin-bottom: 0;
    color: #e3eeee;
    font-size: 0.87rem;
}

.memory-form {
    padding: clamp(35px, 5vw, 66px);
}

.honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.validation-summary {
    margin-bottom: 25px;
    padding: 12px 16px;
    border-left: 4px solid var(--danger);
    background: #fff2f2;
    color: #6b2b2b;
}

.form-field {
    margin-bottom: 25px;
}

.form-field label,
.consent-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 0.91rem;
    font-weight: 750;
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="file"],
.form-field textarea {
    width: 100%;
    border: 1px solid #b9c7c4;
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field textarea {
    padding: 13px 15px;
}

.form-field input[type="file"] {
    padding: 10px;
}

.form-field textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.65;
}

.form-field input:hover,
.form-field textarea:hover {
    border-color: #789b99;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--teal-deep);
    box-shadow: 0 0 0 3px rgba(79, 148, 151, 0.18);
    outline: none;
}

.form-field--error input,
.form-field--error textarea {
    border-color: var(--danger);
}

.field-help {
    margin: 7px 0 10px;
    color: var(--ink-soft);
    font-size: 0.79rem;
    line-height: 1.55;
}

.field-error {
    margin: 7px 0 0;
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 650;
}

.consent-field {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0 12px;
    margin: 31px 0;
}

.consent-field input {
    width: 19px;
    height: 19px;
    margin-top: 5px;
    accent-color: var(--teal-deep);
}

.consent-field label {
    margin: 0;
    font-weight: 550;
    line-height: 1.6;
}

.consent-field .field-error {
    grid-column: 2;
}

.selected-files {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.selected-file {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--sage-pale);
}

.selected-file__preview {
    display: grid;
    width: 58px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border-radius: 5px;
    background: var(--teal-pale);
    color: var(--teal-deep);
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
}

.selected-file__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-file__name {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file__remove {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
}

.memory-form__submit {
    min-width: 180px;
}

.approved-memories {
    border-top: 1px solid var(--line);
}

.section-heading--memories {
    align-items: center;
}

.section-heading--memories > p {
    justify-self: end;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
}

.memory-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    padding: clamp(28px, 4vw, 45px);
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow-small);
}

.memory-card__quote {
    position: absolute;
    top: -13px;
    right: 20px;
    color: var(--teal-pale);
    font-family: var(--serif);
    font-size: 7.5rem;
    line-height: 1;
}

.memory-card time {
    position: relative;
    display: block;
    margin-bottom: 20px;
    color: var(--teal-deep);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.memory-card__text {
    position: relative;
    color: #455351;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.memory-card__author {
    margin: 26px 0 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
}

.memory-card__author::before {
    display: inline-block;
    width: 28px;
    height: 1px;
    margin: 0 10px 4px 0;
    background: var(--teal);
    content: "";
}

.memory-card__media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 26px;
}

.memory-card__media > :only-child {
    grid-column: 1 / -1;
}

.memory-card__image {
    overflow: hidden;
    background: var(--teal-pale);
}

.memory-card__image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 240ms ease;
}

.memory-card__image:hover img {
    transform: scale(1.025);
}

.memory-card video {
    width: 100%;
    max-height: 340px;
    grid-column: 1 / -1;
    background: #172122;
}

.empty-state,
.error-state {
    max-width: 820px;
    margin-inline: auto;
    padding: clamp(48px, 7vw, 85px);
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--shadow-small);
    text-align: center;
}

.empty-state__mark {
    display: grid;
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    place-items: center;
    border: 1px solid var(--sage);
    border-radius: 50%;
    color: var(--teal-deep);
    font-family: var(--serif);
    font-size: 2.3rem;
}

.empty-state h3,
.error-state h1 {
    color: var(--teal-deep);
}

.empty-state p,
.error-state p {
    margin-bottom: 0;
    color: var(--ink-soft);
}

.error-state {
    margin-block: clamp(80px, 12vw, 150px);
}

.error-state h1 {
    font-size: clamp(2.6rem, 5vw, 4.7rem);
}

.error-state__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-top: 32px;
}

.text-link {
    font-weight: 750;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 54px;
}

.pagination a,
.pagination > span {
    display: grid;
    min-width: 42px;
    min-height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
}

.pagination a:hover,
.pagination__current {
    border-color: var(--teal-deep) !important;
    background: var(--teal-deep) !important;
    color: var(--white) !important;
}

.lightbox {
    width: min(96vw, 1180px);
    max-width: none;
    height: min(94vh, 900px);
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--white);
}

.lightbox::backdrop {
    background: rgba(17, 29, 30, 0.93);
}

.lightbox__frame {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    align-items: center;
}

.lightbox figure {
    display: grid;
    max-width: 100%;
    max-height: 90vh;
    justify-items: center;
    margin: 0;
}

.lightbox img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
}

.lightbox figcaption {
    min-height: 28px;
    margin-top: 12px;
    color: #e0e9e8;
    font-size: 0.88rem;
    text-align: center;
}

.lightbox__close,
.lightbox__control {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(24, 45, 46, 0.7);
    color: var(--white);
    cursor: pointer;
    font-size: 2rem;
}

.lightbox__close {
    position: absolute;
    z-index: 2;
    top: 7px;
    right: 7px;
    font-size: 1.6rem;
}

.lightbox__control {
    justify-self: center;
}

.site-footer {
    padding-block: 50px;
    background: #294f52;
    color: var(--white);
}

.site-footer__inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;
}

.site-footer__label {
    margin: 0 0 3px;
    color: #b9d7d6;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.site-footer__name {
    margin: 0;
    font-family: var(--serif);
    font-size: 2rem;
}

.site-footer__copyright {
    margin: 0;
    color: #d3e2e1;
    font-size: 0.78rem;
    text-align: right;
}

@media (max-width: 940px) {
    .hero {
        min-height: auto;
        grid-template-columns: 0.82fr 1.18fr;
        gap: 48px;
    }

    .about-grid {
        grid-template-columns: 0.75fr 1.25fr;
        gap: 55px;
    }

    .memory-form-card {
        grid-template-columns: 1fr;
    }

    .memory-form-card__intro {
        display: grid;
        grid-template-columns: 1fr 0.75fr;
        gap: 36px;
    }

    .memory-form-card__intro .privacy-note {
        margin-top: 0;
        padding: 0 0 0 28px;
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, 0.23);
    }
}

@media (max-width: 760px) {
    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .site-header__inner {
        min-height: 88px;
        gap: 20px;
    }

    .public-nav {
        gap: 20px;
    }

    .public-nav a {
        padding-inline: 2px;
        font-size: 0.88rem;
    }

    .hero,
    .about-grid,
    .section-heading {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 72px;
        padding-top: 50px;
    }

    .hero__portrait {
        width: min(88%, 480px);
        justify-self: start;
        margin-left: 17px;
    }

    .hero__content {
        max-width: none;
    }

    .about-grid__visual {
        width: min(86%, 430px);
        margin-left: 12px;
    }

    .section-heading {
        gap: 20px;
    }

    .photo-gallery {
        min-height: 760px;
        grid-template-columns: 1fr;
        grid-template-rows: 1.2fr 0.8fr 0.8fr;
    }

    .photo-gallery__item--1 {
        grid-row: auto;
    }

    .photo-gallery__item span {
        opacity: 1;
        transform: none;
    }

    .memory-form-card__intro {
        display: block;
    }

    .memory-form-card__intro .privacy-note {
        margin-top: 30px;
        padding: 24px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.23);
        border-left: 0;
    }

    .memory-grid {
        grid-template-columns: 1fr;
    }

    .section-heading--memories > p {
        justify-self: start;
    }

    .site-footer__inner {
        align-items: start;
        flex-direction: column;
    }

    .site-footer__copyright {
        text-align: left;
    }

    .lightbox__frame {
        grid-template-columns: 48px minmax(0, 1fr) 48px;
    }

    .lightbox__control {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 0.96rem;
    }

    .site-header__inner {
        min-height: 102px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }

    .memorial-mark__name {
        font-size: 1.55rem;
    }

    .public-nav {
        width: 100%;
        justify-content: flex-end;
        gap: 30px;
    }

    .public-nav a {
        padding-block: 6px 10px;
    }

    .public-nav a::after {
        bottom: 3px;
    }

    .hero__portrait {
        width: 90%;
        margin-left: 10px;
    }

    .hero__portrait::before {
        top: -15px;
        right: 34px;
        bottom: 24px;
        left: -16px;
    }

    .hero__portrait::after {
        right: -25px;
        bottom: -28px;
    }

    .hero__frame {
        right: -14px;
        bottom: -15px;
        width: 60px;
        height: 60px;
    }

    .memorial-dates {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .memorial-dates span[aria-hidden] {
        display: none;
    }

    .memory-form,
    .memory-form-card__intro {
        padding: 29px 22px;
    }

    .memory-card {
        padding: 28px 23px;
    }

    .memory-card__media {
        grid-template-columns: 1fr;
    }

    .memory-card__media > * {
        grid-column: 1;
    }

    .error-state__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .selected-file {
        grid-template-columns: 45px minmax(0, 1fr);
    }

    .selected-file__preview {
        width: 45px;
    }

    .selected-file__remove {
        grid-column: 2;
        justify-self: start;
    }

    .lightbox {
        width: 100vw;
        height: 100vh;
    }

    .lightbox__frame {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
    }

    .lightbox__close {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Keep lightbox content in the correct columns when arrows are hidden. */
.lightbox__control--previous {
    grid-column: 1;
    grid-row: 1;
}

.lightbox figure {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
}

.lightbox__control--next {
    grid-column: 3;
    grid-row: 1;
}