:root {
    color-scheme: light;
    --background: #f4f3ed;
    --surface: #ffffff;
    --surface-soft: #f8faf7;
    --text: #223129;
    --text-muted: #5e6b63;
    --border: #d8ded8;
    --primary: #285b49;
    --primary-dark: #174435;
    --primary-soft: #e1efe8;
    --accent: #a15f27;
    --header-background: #ffffff;
    --heading: #253b2e;
    --section-heading: #2d4235;
    --secondary-button-background: #ffffff;
    --secondary-button-hover: #e1efe8;
    --site-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --danger: #a12e2e;
    --danger-dark: #7c2020;
    --danger-soft: #fbe8e8;
    --warning: #8a5b08;
    --warning-soft: #fff3d8;
    --success: #23663f;
    --success-soft: #e3f4e9;
    --focus: #2563eb;
    --shadow: 0 1.25rem 3.5rem rgba(35, 53, 42, 0.1);
    font-family: var(--site-font);
    color: var(--text);
    background: var(--background);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background-color: var(--background);
    background-image: radial-gradient(circle at top left, rgba(223, 166, 99, 0.12), transparent 34rem);
    font-size: 1rem;
    line-height: 1.55;
}

a {
    color: var(--primary);
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--primary-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #fff;
    background: var(--primary-dark);
    transform: translateY(-150%);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(40, 91, 73, 0.14);
    background: var(--header-background);
    backdrop-filter: blur(0.75rem);
}

.header-inner {
    width: calc(100% - 2rem);
    min-height: 4.75rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark {
    width: 2.55rem;
    height: 2.55rem;
    display: inline-grid;
    place-items: center;
    border-radius: 0.8rem;
    color: #fff;
    background: var(--primary);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.brand-logo {
    width: auto;
    max-width: 10rem;
    height: 2.75rem;
    display: block;
    object-fit: contain;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
}

.primary-nav a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    color: #3f5046;
    font-weight: 650;
    text-decoration: none;
}

.primary-nav a:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.account-menu {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.signed-in-name {
    max-width: 12rem;
    overflow: hidden;
    color: var(--text-muted);
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-shell {
    width: calc(100% - 2rem);
    min-height: calc(100vh - 10rem);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.site-footer {
    width: calc(100% - 2rem);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
    padding: 1.5rem 0 2.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.page-heading {
    max-width: 50rem;
    margin-bottom: 2rem;
}

.page-heading-with-actions,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.section-heading {
    margin-bottom: 1rem;
}

.section-heading h2,
.edit-panel h2 {
    margin: 0;
    color: var(--section-heading);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 500;
}

.section-heading p,
.edit-panel h2 + p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.section-block {
    margin-top: 2.5rem;
}

.page-heading h1,
.auth-card h1,
.empty-state h1 {
    margin: 0;
    color: var(--heading);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.35rem, 6vw, 4.25rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.page-heading p:not(.eyebrow),
.auth-intro,
.empty-state p {
    margin: 1rem 0 0;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.card,
.panel {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: 0 0.75rem 2rem rgba(35, 53, 42, 0.06);
}

.family-switcher {
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) minmax(18rem, 1fr);
    align-items: end;
    gap: 1.25rem 2rem;
    padding: 1.5rem;
}

.family-switcher label,
.form-field label,
fieldset legend {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--text);
    font-size: 1rem;
    font-weight: 750;
}

.field-help {
    display: block;
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.inline-actions,
.page-actions,
.table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.action-card {
    min-height: 8rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.4rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 0.75rem 2rem rgba(35, 53, 42, 0.05);
    text-decoration: none;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.action-card:hover {
    border-color: #94b5a4;
    color: var(--text);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.action-card strong,
.action-card small {
    display: block;
}

.action-card strong {
    margin-top: 0.05rem;
    font-size: 1.1rem;
}

.action-card small {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.action-icon {
    min-width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 0.8rem;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.05em;
}

.button,
input[type="submit"].button,
button.button {
    min-height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border: 2px solid transparent;
    border-radius: 0.7rem;
    font: inherit;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--primary);
}

.button-primary:hover {
    color: #fff;
    background: var(--primary-dark);
}

.button-secondary {
    border-color: #b9c7be;
    color: var(--primary-dark);
    background: var(--secondary-button-background);
}

.button-secondary:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: var(--secondary-button-hover);
}

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

.button-danger:hover {
    color: #fff;
    background: var(--danger-dark);
}

.button-small {
    min-height: 2.4rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
}

.button-full {
    width: 100%;
    margin-top: 0.5rem;
}

.button[disabled],
input[disabled].button {
    opacity: 0.55;
    cursor: not-allowed;
}

.text-input,
.select-input,
.textarea-input,
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    border: 2px solid #b9c5bd;
    border-radius: 0.65rem;
    color: var(--text);
    background: #fff;
    font: inherit;
}

textarea,
.textarea-input {
    min-height: 7rem;
    resize: vertical;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--focus);
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 1rem;
}

.auth-shell,
.setup-shell {
    width: 100%;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(100%, 31rem);
    padding: clamp(1.6rem, 5vw, 3rem);
    border: 1px solid rgba(56, 79, 65, 0.15);
    border-radius: 1.35rem;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.setup-card {
    width: min(100%, 54rem);
    margin: 2rem 0;
}

.wide-auth-shell .auth-card {
    width: min(100%, 42rem);
}

.auth-secondary-action {
    margin-top: 0.85rem;
}

.friendly-steps {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.friendly-steps li {
    margin-bottom: 0.8rem;
    padding-left: 0.35rem;
}

.setup-key {
    padding: 1rem;
    border: 2px dashed #9eb2a5;
    border-radius: 0.75rem;
    color: var(--primary-dark);
    background: var(--surface-soft);
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(1rem, 4vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
    text-align: center;
}

.code-input {
    max-width: 18rem;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
}

.recovery-code-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 1.5rem 0;
    padding: 0;
    list-style: none;
}

.recovery-code-list li {
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--surface-soft);
    font-family: Consolas, "Courier New", monospace;
    font-weight: 800;
}

.auth-brand {
    margin-bottom: 2.5rem;
}

.auth-card h1 {
    font-size: clamp(2.5rem, 7vw, 3.75rem);
}

.auth-card form {
    margin-top: 2rem;
}

.form-field {
    margin-bottom: 1.25rem;
}

.field-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 750;
}

.edit-panel {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.compact-panel {
    margin-bottom: 1.25rem;
}

.aligned-checkbox {
    display: flex;
    align-items: center;
    padding-top: 1.85rem;
}

.checkbox-list,
.permission-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.checkbox-list li,
.permission-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid #edf0ed;
}

.checkbox-list li:last-child,
.permission-list li:last-child {
    border-bottom: 0;
}

.checkbox-list input,
.permission-list input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.15rem;
}

.member-add-grid {
    grid-template-columns: minmax(14rem, 2fr) minmax(12rem, 1fr) auto;
    align-items: end;
}

.member-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.member-option {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--surface-soft);
}

.member-option h3,
.member-signin-panel h3 {
    margin: 0 0 0.5rem;
    color: var(--section-heading);
    font-size: 1.2rem;
}

.member-signin-panel {
    margin: 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid #b8ccbe;
    border-radius: 0.85rem;
    background: var(--primary-soft);
}

.danger-details {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.danger-details summary {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    color: var(--danger-dark);
    font-weight: 750;
    cursor: pointer;
}

code {
    padding: 0.1rem 0.3rem;
    border-radius: 0.3rem;
    color: #37473d;
    background: #e8ece8;
    font-size: 0.92em;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

.form-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

fieldset {
    min-width: 0;
    margin: 0 0 2rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
}

fieldset legend {
    padding: 0 0.5rem;
    font-size: 1.1rem;
}

.checkbox-field {
    margin: 0.25rem 0 1.25rem;
}

.checkbox-field label {
    margin-left: 0.45rem;
}

.checkbox-field input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: middle;
}

.quiet-link {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
}

.form-message:empty,
.field-error:empty {
    display: none;
}

.form-message {
    display: block;
    margin: 0.8rem 0;
    font-weight: 650;
}

.field-error,
.error-message {
    display: block;
    margin-top: 0.35rem;
    color: var(--danger-dark);
    font-weight: 650;
}

.success-message {
    color: var(--success);
}

.notice {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid;
    border-radius: 0.75rem;
}

.notice-error {
    border-color: #dda4a4;
    color: var(--danger-dark);
    background: var(--danger-soft);
}

.notice-warning {
    border-color: #e1c27d;
    color: #634208;
    background: var(--warning-soft);
}

.notice-success {
    border-color: #a3cdb2;
    color: var(--success);
    background: var(--success-soft);
}

.notice ul {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.completion-panel,
.empty-state {
    text-align: center;
}

.completion-panel h2 {
    margin: 1rem 0 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 500;
}

.success-mark,
.empty-state-icon {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 50%;
    color: var(--success);
    background: var(--success-soft);
    font-size: 1.8rem;
    font-weight: 800;
}

.empty-state {
    max-width: 42rem;
    margin: 4rem auto;
    padding: 3rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.empty-state-icon {
    color: var(--danger-dark);
    background: var(--danger-soft);
}

.empty-state h1 {
    margin-top: 1.25rem;
    font-size: clamp(2rem, 5vw, 3rem);
}

.empty-state .button {
    margin-top: 1.5rem;
}

.data-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e7ebe7;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: #435148;
    background: #f4f7f4;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tr:hover td {
    background: #fbfcfa;
}

.permission-matrix-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--surface);
}

.permission-matrix {
    width: 100%;
    min-width: 51rem;
    border-collapse: collapse;
}

.permission-matrix th,
.permission-matrix td {
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid #e7ebe7;
    text-align: center;
    vertical-align: middle;
}

.permission-matrix thead th {
    color: #435148;
    background: #f4f7f4;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.permission-matrix th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 12rem;
    border-right: 1px solid var(--border);
    background: #f8faf7;
    text-align: left;
}

.permission-matrix thead th:first-child {
    z-index: 2;
    background: #eef3ef;
}

.permission-matrix tr:last-child th,
.permission-matrix tr:last-child td {
    border-bottom: 0;
}

.permission-matrix input[type="checkbox"] {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
    cursor: pointer;
}

.permission-matrix input[type="checkbox"]:disabled,
.permission-matrix .aspNetDisabled input[type="checkbox"] {
    cursor: not-allowed;
    opacity: .52;
}

.permission-matrix input[type="checkbox"][disabled] {
    cursor: not-allowed;
}

.permission-other-cell {
    min-width: 14rem;
    text-align: left !important;
}

.permission-other-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.permission-other-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.permission-other-list label {
    line-height: 1.35;
}

.permission-matrix-help {
    margin-top: 0.75rem;
}

.embedded-permission-section {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}

.embedded-permission-section > p {
    margin: 0.4rem 0 1.25rem;
    color: var(--text-muted);
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.section-heading-row h2,
.section-heading-row p {
    margin: 0;
}

.section-heading-row p {
    margin-top: 0.35rem;
    color: var(--text-muted);
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-grid.align-end {
    align-items: end;
}

.feature-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.feature-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 6.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface-soft);
    cursor: pointer;
}

.feature-choice input[type="checkbox"] {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.15rem;
}

.feature-choice span,
.feature-choice strong,
.feature-choice small {
    display: block;
}

.feature-choice strong {
    color: var(--heading);
    font-size: 1.05rem;
}

.feature-choice small {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 8;
    margin-top: 1.25rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -0.6rem 1.5rem rgba(35, 53, 42, 0.08);
}

.form-card-narrow {
    max-width: 56rem;
}

.event-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.event-hero h1 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(2.2rem, 6vw, 4.7rem);
    line-height: 1;
}

.event-lead {
    max-width: 54rem;
    margin: 0.8rem 0 0;
    color: var(--text-muted);
    font-size: 1.15rem;
}

.event-fact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.event-fact {
    min-height: 7rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--surface);
}

.event-fact span,
.event-fact strong,
.event-fact small {
    display: block;
}

.event-fact span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.event-fact strong {
    margin-top: 0.35rem;
    color: var(--heading);
    font-size: 1.05rem;
}

.event-fact small {
    margin-top: 0.3rem;
    color: var(--text-muted);
}

.event-primary-actions {
    margin-bottom: 1.25rem;
}

.event-info-block {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    border-left: 0.3rem solid var(--primary);
    border-radius: 0.35rem;
    background: var(--primary-soft);
}

.event-info-block h3,
.event-info-block p {
    margin: 0;
}

.event-info-block p {
    margin-top: 0.4rem;
}

.contribution-panel {
    border-top: 0.3rem solid var(--accent);
}

.contribution-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 0.8rem;
    margin: 0.4rem 0 1rem;
    padding: 0.7rem 1rem;
    border-radius: 0.7rem;
    background: var(--warning-soft);
}

.contribution-amount span {
    color: var(--text-muted);
}

.contribution-amount strong {
    color: var(--heading);
    font-size: 1.45rem;
}

.attendance-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.attendance-totals > div {
    padding: 0.9rem;
    border-radius: 0.75rem;
    background: var(--primary-soft);
    text-align: center;
}

.attendance-totals strong,
.attendance-totals span {
    display: block;
}

.attendance-totals strong {
    color: var(--heading);
    font-size: 1.75rem;
}

.attendance-totals span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.allergy-warning {
    margin-bottom: 1rem;
    border-left: 0.4rem solid var(--warning);
}

.allergy-warning h2,
.allergy-warning p {
    margin: 0;
}

.allergy-warning p {
    margin-top: 0.45rem;
}

.allergy-acknowledgement {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 2px solid var(--warning);
    border-radius: 0.75rem;
    background: var(--warning-soft);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    color: var(--success);
    background: var(--success-soft);
    font-size: 0.8rem;
    font-weight: 750;
}

.status-pill.inactive {
    color: #6d4c16;
    background: var(--warning-soft);
}

.muted {
    color: var(--text-muted);
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.breadcrumb a {
    font-weight: 700;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.settings-card {
    min-height: 9rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 0.75rem 2rem rgba(35, 53, 42, 0.05);
    text-decoration: none;
}

.settings-card:hover {
    border-color: #94b5a4;
    color: var(--text);
    box-shadow: var(--shadow);
}

.settings-card strong,
.settings-card small {
    display: block;
}

.settings-card strong {
    font-size: 1.15rem;
}

.settings-card small {
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.55;
}

.advanced-settings-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 1.35rem 1.5rem;
}

.advanced-settings-link h2,
.settings-form h2 {
    margin: 0;
    color: var(--section-heading);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.6rem;
    font-weight: 500;
}

.advanced-settings-link p,
.settings-form h2 + p,
.section-title-row p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.settings-form {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.settings-section {
    padding: 0 0 2rem;
    margin: 0 0 2rem;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-of-type {
    margin-bottom: 1.5rem;
}

.settings-section > h2 + p,
.settings-section > .section-title-row + .checkbox-field {
    margin-top: 1rem;
}

.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.settings-field-medium {
    max-width: 26rem;
    margin-top: 1.25rem;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.input-with-suffix .text-input {
    max-width: 8rem;
}

.large-check {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
}

.large-check input[type="checkbox"] {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0 0.6rem 0 0;
    vertical-align: middle;
}

.large-check label {
    font-weight: 650;
}

.unavailable-setting {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--surface-soft);
}

.settings-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 2rem;
    margin-top: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.split-actions {
    justify-content: space-between;
}

.split-actions > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.color-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(10rem, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.color-setting {
    margin-bottom: 0;
}

input[type="color"].color-input {
    width: 5.5rem;
    min-height: 3.25rem;
    padding: 0.25rem;
    border: 2px solid #b9c5bd;
    border-radius: 0.65rem;
    background: #fff;
    cursor: pointer;
}

.current-logo-panel {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface-soft);
    font-weight: 750;
}

.current-logo {
    width: auto;
    max-width: min(18rem, 65%);
    max-height: 5rem;
    object-fit: contain;
}

.file-input {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.65rem;
    border: 2px solid #b9c5bd;
    border-radius: 0.65rem;
    background: #fff;
    font: inherit;
}

.profile-section + .profile-section {
    margin-top: 1.5rem;
}

.sensitivity-editor {
    display: grid;
    grid-template-columns: minmax(12rem, 2fr) minmax(11rem, 1fr);
    gap: 0 1rem;
    margin-top: 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--surface-soft);
}

.sensitivity-notes,
.sensitivity-actions {
    grid-column: 1 / -1;
}

.profile-table {
    margin-top: 1.5rem;
}

.header-compact .header-inner {
    min-height: 3.75rem;
}

.header-compact .brand-mark {
    width: 2.2rem;
    height: 2.2rem;
}

.header-compact .brand-logo {
    height: 2.25rem;
}

/* Reunion detail experience */
.event-visual-hero {
    position: relative;
    min-height: clamp(20rem, 48vw, 31rem);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    color: #fff;
    background:
        radial-gradient(circle at 82% 15%, rgba(223, 166, 99, 0.46), transparent 26rem),
        linear-gradient(135deg, #315f4e 0%, #173f33 68%, #112e27 100%);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.event-visual-hero-image,
.event-visual-hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.event-visual-hero-image {
    z-index: -2;
    display: block;
    object-fit: cover;
}

.event-visual-hero-shade {
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12) 15%, rgba(0, 0, 0, 0.76) 100%);
}

.event-visual-hero:not(.has-photo) .event-visual-hero-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.34));
}

.event-visual-hero-content {
    width: min(100%, 58rem);
    padding: clamp(1.5rem, 5vw, 3.5rem);
}

.event-visual-hero h1 {
    max-width: 18ch;
    margin: 0.35rem 0 0.6rem;
    color: #fff;
    font-size: clamp(2.25rem, 6vw, 4.75rem);
    line-height: 1.02;
    text-wrap: balance;
    text-shadow: 0 0.15rem 1.2rem rgba(0, 0, 0, 0.32);
}

.event-hero-status {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.34);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.5rem;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 700;
}

.event-hero-meta span + span::before {
    content: "\2022";
    margin-right: 1.5rem;
    opacity: 0.7;
}

.event-detail-nav {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: stretch;
    gap: 0.25rem;
    min-height: 4.25rem;
    margin-bottom: 1.5rem;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 1.25rem 1.25rem;
    background: var(--surface);
    box-shadow: 0 0.8rem 2rem rgba(35, 53, 42, 0.08);
}

.event-detail-nav > a,
.event-more-menu > summary,
.event-more-menu-items a {
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.9rem;
    border-radius: 0.65rem;
    color: var(--text);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.event-detail-nav > a:hover,
.event-more-menu > summary:hover,
.event-more-menu[open] > summary,
.event-more-menu-items a:hover {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.event-detail-nav .event-detail-nav-back {
    margin-right: auto;
    color: var(--primary);
}

.event-detail-nav-back span {
    margin-right: 0.4rem;
    font-size: 1.35rem;
}

.event-more-menu {
    position: relative;
}

.event-more-menu > summary {
    height: 100%;
    list-style: none;
}

.event-more-menu > summary::-webkit-details-marker {
    display: none;
}

.event-more-menu > summary::after {
    content: "\25BE";
    margin-left: 0.45rem;
    font-size: 0.78rem;
}

.event-more-menu-items {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    width: max-content;
    min-width: 13.5rem;
    display: none;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.event-more-menu[open] .event-more-menu-items,
.event-more-menu:hover .event-more-menu-items,
.event-more-menu:focus-within .event-more-menu-items {
    display: grid;
}

.event-visual-section {
    position: relative;
    margin-top: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    background: var(--surface);
    box-shadow: 0 0.9rem 2.5rem rgba(35, 53, 42, 0.07);
}

.event-visual-section h2 {
    margin: 0.1rem 0 0.25rem;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.event-visual-section .section-heading-row {
    margin-bottom: 1.25rem;
}

.anchor-target {
    position: absolute;
    top: -6rem;
}

.meal-calendar-scroll {
    overflow-x: auto;
    padding: 0.2rem 0 0.8rem;
    scrollbar-color: var(--primary) var(--primary-soft);
}

.meal-calendar-grid {
    min-width: max-content;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 9.8rem;
    gap: 0.65rem;
}

.meal-calendar-day {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface-soft);
}

.meal-calendar-day > header {
    min-height: 3.7rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 0.75rem;
    color: #fff;
    background: var(--primary);
}

.meal-calendar-day > header span {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.meal-calendar-day > header strong {
    font-size: 1.45rem;
    line-height: 1;
}

.meal-day-items {
    display: grid;
    gap: 0.55rem;
    padding: 0.55rem;
}

.meal-day-items:empty::after {
    content: "No shared meals";
    min-height: 6rem;
    display: grid;
    place-items: center;
    padding: 0.65rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.meal-calendar-card {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--surface);
}

.meal-calendar-card h3 {
    margin: 0.35rem 0 0.4rem;
    font-size: 1rem;
    line-height: 1.22;
}

.meal-calendar-card p {
    margin: 0.3rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.meal-card-kicker {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.meal-menu-item {
    min-height: 2.2rem;
    color: var(--text);
    font-weight: 700;
}

.meal-volunteer span {
    color: var(--text-muted);
}

.meal-headcount {
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

.meal-card-actions {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.6rem;
}

.meal-card-actions .button {
    width: 100%;
    min-height: 2.55rem;
    padding: 0.48rem 0.55rem;
    white-space: normal;
}

.contribution-simple-section {
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(24rem, 1.55fr);
    gap: 1.25rem 2rem;
    align-items: end;
}

.contribution-quick-form {
    display: grid;
    grid-template-columns: auto minmax(11rem, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.contribution-amount-choice {
    min-width: 5rem;
    min-height: 3rem;
    padding: 0.65rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 0.7rem;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
}

.contribution-amount-choice:hover {
    color: #fff;
    background: var(--primary);
}

.currency-input {
    position: relative;
}

.currency-input span {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    color: var(--text-muted);
    font-weight: 750;
    transform: translateY(-50%);
}

.currency-input input {
    width: 100%;
    min-height: 3rem;
    padding: 0.65rem 0.75rem 0.65rem 1.8rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    color: var(--text);
    background: #fff;
    font: inherit;
}

.contribution-simple-section > .field-help {
    grid-column: 1 / -1;
    margin: 0;
}

.attendance-inline-form {
    padding: clamp(1rem, 2vw, 1.4rem);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface-soft);
}

.form-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.related-attendance-panel {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: var(--surface);
}

.related-attendance-panel h3,
.related-attendance-panel p {
    margin-top: 0;
}

.related-member-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-member-checklist li {
    min-height: 3rem;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
}

.related-member-checklist input {
    width: 1.15rem;
    height: 1.15rem;
    margin-right: 0.55rem;
}

.meal-dialog {
    width: min(100% - 1.5rem, 46rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 0;
    border-radius: 1rem;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.34);
}

.meal-dialog::backdrop {
    background: rgba(12, 25, 20, 0.72);
    backdrop-filter: blur(0.15rem);
}

.meal-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.meal-dialog-header h2,
.meal-dialog-header p {
    margin-top: 0;
}

.dialog-close {
    width: 3rem;
    height: 3rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    background: var(--surface-soft);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.meal-dialog-editor {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.current-event-photo {
    max-width: 32rem;
    margin: 0.75rem 0 1rem;
}

.current-event-photo img {
    width: 100%;
    max-height: 16rem;
    display: block;
    object-fit: cover;
    border-radius: 0.8rem;
}

.compact-page-actions {
    margin-bottom: 1rem;
}

.attendance-report-unit + .attendance-report-unit {
    margin-top: 1rem;
}

.family-unit-assignment-table .compact-input {
    min-width: 9.5rem;
}

@media (max-width: 62rem) {
    .contribution-simple-section {
        grid-template-columns: 1fr;
    }

    .contribution-quick-form {
        grid-template-columns: auto minmax(10rem, 1fr) auto;
    }
}

@media (max-width: 58rem) {
    .header-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding: 0.75rem 0;
    }

    .primary-nav {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        overflow-x: auto;
    }

    .account-menu {
        margin-left: auto;
    }

    .family-switcher {
        grid-template-columns: 1fr;
    }

    .member-add-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid,
    .color-settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 42rem) {
    .content-shell,
    .site-footer,
    .header-inner {
        width: min(100% - 1.25rem, 76rem);
    }

    .content-shell {
        padding: 2rem 0;
    }

    .signed-in-name {
        display: none;
    }

    .primary-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
        overflow: visible;
    }

    .primary-nav a {
        justify-content: center;
        border: 1px solid var(--border);
        text-align: center;
        white-space: normal;
    }

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

    .form-grid.three-columns,
    .contribution-quick-form {
        grid-template-columns: 1fr;
    }

    .event-visual-hero {
        min-height: 22rem;
        border-radius: 0.9rem 0.9rem 0 0;
    }

    .event-detail-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 0 0 0.9rem 0.9rem;
    }

    .event-detail-nav .event-detail-nav-back {
        grid-column: 1 / -1;
        margin-right: 0;
    }

    .event-detail-nav > a,
    .event-more-menu > summary {
        justify-content: center;
        text-align: center;
    }

    .event-more-menu-items {
        right: 0;
        min-width: min(17rem, calc(100vw - 2rem));
    }

    .event-visual-section {
        padding: 1.15rem;
    }

    .meal-calendar-grid {
        grid-auto-columns: 10.75rem;
    }

    .contribution-submit,
    .contribution-amount-choice {
        width: 100%;
    }

    .form-field.full-width {
        grid-column: auto;
    }

    .feature-choice-grid,
    .event-fact-grid,
    .attendance-totals {
        grid-template-columns: 1fr;
    }

    .event-hero {
        flex-direction: column;
    }

    .settings-grid,
    .settings-check-grid,
    .color-settings-grid,
    .sensitivity-editor {
        grid-template-columns: 1fr;
    }

    .member-option-grid,
    .recovery-code-list {
        grid-template-columns: 1fr;
    }

    .sensitivity-notes,
    .sensitivity-actions {
        grid-column: auto;
    }

    .page-heading-with-actions,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-actions,
    .page-actions,
    .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-actions .button,
    .page-actions .button,
    .table-actions .button,
    .inline-actions input[type="submit"] {
        width: 100%;
    }

    .site-footer {
        flex-direction: column;
    }

    .advanced-settings-link,
    .section-title-row,
    .section-heading-row,
    .split-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
