:root {
    --color-primary: #00c3f4;
    --color-primary-variant: #0062f4;
    --color-gradient: linear-gradient(var(--color-primary), var(--color-primary-variant));
    --color-white: white;
    --color-black: black;

    --container-width-lg: 80%;
    --container-width-md: 92%;
}

.profiles-page {
    color: #172635;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    width: min(1180px, 100%);
}

.profiles-header {
    align-items: center;
    background: #172635;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.profiles-header h1 {
    color: #ffffff;
    margin: 0.15rem 0;
    text-align: left;
}

.profiles-header p {
    margin: 0;
}

.profiles-kicker {
    color: #7fd6ec;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profiles-alert {
    border-radius: 8px;
}

.profiles-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.profile-card {
    background: #ffffff;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(11, 35, 52, 0.12);
    padding: 1.2rem;
}

.profile-card h2 {
    color: #172635;
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
    text-align: left;
}

.profile-card__links {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
}

.profile-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

@media (max-width: 720px) {
    .profiles-header {
        align-items: stretch;
        flex-direction: column;
    }
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
    ;
}

#homePageContainer {
    min-height: calc(100vh - 70px);
    /* minus navbar */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body {
    background: var(--color-gradient);
    min-height: 100vh;
    font-family: "Montserrat", sans-serif;
}

button {
    padding: .7rem 1.2rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

button:hover {
    opacity: .9;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.navigation-buttons button {
    background: var(--color-primary);
    color: white;
}

#submitBtn {
    background: #28a745;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.ad {
    width: min(var(--ad-max-width, 728px), calc(100% - 2rem));
    margin: clamp(10px, 2vw, 18px) auto;
    text-align: center;
}

.ad a {
    display: block;
    width: 100%;
}

.ad img {
    display: block;
    width: 100%;
    height: clamp(var(--ad-min-height, 64px), var(--ad-height, 12vw), var(--ad-max-height, 110px));
    object-fit: contain;
    border: 1px solid rgba(207, 219, 228, 0.85);
    border-radius: 8px;
    background: #ffffff;
}

.ad-top {
    --ad-max-width: 970px;
    --ad-min-height: 64px;
    --ad-height: 10vw;
    --ad-max-height: 118px;
}

.ad-content {
    --ad-max-width: 728px;
    --ad-min-height: 62px;
    --ad-height: 11vw;
    --ad-max-height: 102px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ad-footer {
    --ad-max-width: 728px;
    --ad-min-height: 58px;
    --ad-height: 10vw;
    --ad-max-height: 96px;
    margin-top: 18px;
    margin-bottom: 18px;
}

@media screen and (min-width: 1200px) {
    .ad {
        width: min(var(--ad-max-width, 970px), 72vw);
    }
}

@media screen and (max-width: 640px) {
    .ad {
        width: min(100% - 1rem, var(--ad-max-width, 728px));
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .ad img {
        height: clamp(54px, 18vw, 88px);
    }
}

.navbar {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding-top: 10px;
    padding-bottom: 10px;
    min-height: 70px;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-brand {
    padding: 0;
    display: flex;
    align-items: center;
}

.navbar-toggler {
    border: none;
}

.user-menu-toggle {
    background: transparent;
    border: 0;
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
    }

    .navbar-nav {
        text-align: center;
    }

    .nav-link {
        padding: 10px 0;
        font-size: 16px;
    }
}

.nav__container {
    width: 100%;
    height: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    margin-right: 20px;
}

.nav__toggle-btn {
    display: none;
}

.nav__logo {
    width: 20.4rem;
    display: grid;
    align-items: left;
    margin-top: 50px;
    left: 0;
}

.nav__logo img {
    width: 100%;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
    top: 0;
}

.nav__links li {
    height: 100%;
}

.nav__links li a {
    color: var(--color-black);
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 400ms ease;
    position: relative;
}

.nav__links li a:hover {
    color: var(--color-primary);
}

.nav__links li a.active::after {
    content: '';
    display: block;
    background: var(--color-primary);
    height: 5px;
    width: 100%;
    position: absolute;
    bottom: 0;
}

section.record {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: auto auto auto auto;
    color: var(--color-white);
    place-items: center;
}

section h1 {
    text-transform: uppercase;
    color: var(--color-white);
    font-size: 3rem;
    grid-row: 1;
    grid-column-start: 2;
    grid-column-end: 4;
    place-items: center;

}

h1 {
    text-align: center;
    margin-bottom: 2rem;
}

section #record.container__record {
    margin-top: 20px;
    grid-row: 2;
    grid-column: 2;
    grid-column-start: 2;
    grid-column-end: 4;
    place-items: center;
}

section #gallery.container__record {
    position: absolute;
    display: grid;
    margin-top: 100px;
    width: 80%;
    place-items: center;
    grid-template-columns: repeat(auto);
    grid-template-rows: repeat(auto);
}

.item {
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    border-radius: 30px;
    margin-bottom: 10px;
    padding: 10px;
}

.form-container {
    width: 700px;
    max-width: 95%;
    margin: 5rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: .4rem;
}

input,
textarea,
select {
    width: 100%;
    padding: .7rem;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: .95rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border: 1px solid var(--color-primary);
}

.entry {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.entry input {
    flex: 1;
}

.wrapper {
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    padding: 30px 25px;

    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    color: #fff;
}

.wrapper h1 {
    font-size: 36px;
    text-align: center;
}

.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 30px 0;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    font-size: 16px;
    color: #fff;
    padding: 14px 20px;
    transition: 0.3s ease;

}

.input-box input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.input-box input::placeholder {
    color: #fff;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 30%;
    transform: translate(-50%);
    font-size: 20px;
}

.wrapper .remember-forgot {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    margin: -15px 0 15px;
}

.remember-forgot label input {
    accent-color: #fff;
    margin-right: 3px;
}

.remember-forgot a {
    color: #fff;
    text-decoration: underline;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.fade-out {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.hidden {
    display: none !important;
}

[hidden],
.auth-card .hidden {
    display: none !important;
}

.auth-request-panel {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #f6fafc;
    color: var(--color-text);
}

.auth-request-panel strong,
.auth-request-panel p,
.auth-request-panel small {
    margin: 0;
}

.auth-request-panel small {
    color: var(--color-muted);
}

.wrapper .btn {
    width: 100%;
    height: 50px;
    background: #fff;
    border: none;
    outline: none;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    cursor: pointer;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.wrapper .register-link {
    font-size: 14.5px;
    text-align: center;
    margin-top: 20px 0 15px;
}

.register-link p a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.login-link p a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.register-link p a:hover {
    text-decoration: underline;
}


@media screen and (max-width: 768px) {

    .entry {
        flex-direction: column;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

}

.auth-toggle-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-toggle-btn:hover {
    background: white;
    color: #0062f4;
}

.site-error-page {
    min-height: calc(100vh - 70px);
    display: grid;
    place-items: center;
    padding: 48px 20px;
}

.site-error-card {
    width: min(620px, 100%);
    padding: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    text-align: center;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(12px);
}

.site-error-code {
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.site-error-card h1 {
    margin-bottom: 16px;
    color: white;
}

.site-error-card p {
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.site-error-action {
    min-width: 160px;
}

.admin-users-page,
.admin-ads-page,
.admin-settings-page,
.admin-tiers-page {
    width: min(1240px, calc(100% - 32px));
    margin: 1.25rem auto 3rem;
    color: #172635;
}

.admin-users-header,
.admin-users-create,
.admin-users-list,
.admin-ads-header,
.admin-ads-form,
.admin-ads-list,
.admin-settings-header,
.admin-settings-preview,
.admin-settings-form,
.admin-settings-reset,
.admin-tiers-header,
.admin-tiers-create,
.admin-tiers-list,
.admin-tier-card {
    background: #ffffff;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(11, 35, 52, 0.10);
}

.admin-users-header,
.admin-ads-header,
.admin-settings-header,
.admin-tiers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: #172635;
    border-color: rgba(255, 255, 255, 0.08);
    border-top: 0;
    color: #ffffff;
}

.admin-users-header h1,
.admin-users-create h2,
.admin-users-list h2,
.admin-ads-header h1,
.admin-ads-form h2,
.admin-ads-list h2,
.admin-settings-header h1,
.admin-settings-preview h2,
.admin-settings-form h2,
.admin-settings-reset h2,
.admin-tiers-header h1,
.admin-tiers-create h2,
.admin-tiers-list h2,
.admin-tier-card h3 {
    color: #172635;
    text-align: left;
    margin-bottom: 0.25rem;
    text-transform: none;
    line-height: 1.2;
}

.admin-users-header h1,
.admin-ads-header h1,
.admin-settings-header h1,
.admin-tiers-header h1 {
    color: #ffffff;
    font-size: 1.75rem;
}

.admin-users-create h2,
.admin-users-list h2,
.admin-ads-form h2,
.admin-ads-list h2,
.admin-settings-preview h2,
.admin-settings-form h2,
.admin-settings-reset h2,
.admin-tiers-create h2,
.admin-tiers-list h2 {
    font-size: 1.35rem;
}

.admin-users-header p,
.admin-users-section-title p,
.admin-ads-header p,
.admin-settings-header p,
.admin-settings-reset p,
.admin-tiers-header p {
    color: #5d6e7d;
    margin: 0;
}

.admin-users-header p,
.admin-ads-header p,
.admin-settings-header p,
.admin-tiers-header p {
    color: rgba(255, 255, 255, 0.76);
}

.admin-users-kicker,
.admin-ads-kicker,
.admin-settings-kicker,
.admin-tiers-kicker {
    color: #7fd6ec;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.admin-users-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 0.75rem;
}

.admin-users-stat {
    min-width: 110px;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.admin-users-stat span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-users-stat strong {
    display: block;
    margin-top: 0.2rem;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1;
}

.admin-users-alert {
    margin-bottom: 1rem;
    border-radius: 8px;
}

.admin-users-create {
    margin-bottom: 1rem;
    padding: 1rem;
}

.admin-users-list {
    padding: 0;
    overflow: visible;
}

.admin-users-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e6eef4;
}

.admin-users-create .admin-users-section-title {
    padding: 0 0 0.75rem;
}

.admin-users-search {
    display: grid;
    gap: 0.35rem;
    width: min(280px, 100%);
}

.admin-users-search label {
    color: #425665;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-users-search input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-users-search input:focus {
    border-color: #00a8d8;
    box-shadow: 0 0 0 3px rgba(0, 168, 216, 0.14);
}

.admin-users-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: start;
    padding-top: 0.75rem;
}

.admin-users-form .form-group {
    margin-bottom: 0;
}

.admin-users-field,
.admin-users-form-action {
    display: grid;
    grid-template-rows: 18px 40px 34px;
    gap: 0.35rem;
    min-width: 0;
}

.admin-users-field--checkbox {
    grid-template-rows: 18px 40px 34px;
}

.admin-users-checkbox {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    margin: 0;
    color: #172635;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
}

.admin-users-checkbox input {
    width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.admin-users-checkbox--table {
    min-height: 40px;
}

.admin-users-form-action {
    align-items: start;
}

.admin-users-action-spacer {
    display: block;
    font-size: 0.74rem;
    line-height: 18px;
}

.admin-users-form label,
.admin-users-table th {
    color: #425665;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-users-form input,
.admin-users-form select,
.admin-users-table input,
.admin-users-table select,
.admin-ads-form input,
.admin-ads-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-users-form .btn {
    align-self: stretch;
    min-height: 40px;
    white-space: nowrap;
}

.admin-users-form input:focus,
.admin-users-form select:focus,
.admin-users-table input:focus,
.admin-users-table select:focus,
.admin-ads-form input:focus,
.admin-ads-form select:focus {
    border-color: #00a8d8;
    box-shadow: 0 0 0 3px rgba(0, 168, 216, 0.14);
}

.admin-users-form .admin-users-checkbox input,
.admin-users-table .admin-users-checkbox input {
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
}

.admin-users-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    background: #ffffff;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.admin-users-empty-state {
    padding: 1rem;
    color: #607283;
    font-weight: 700;
}

.admin-users-update-form {
    display: none;
}

.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1500px;
    background: #ffffff;
    table-layout: fixed;
}

.admin-users-table th:nth-child(1) {
    width: 64px;
}

.admin-users-table th:nth-child(2) {
    width: 17%;
}

.admin-users-table th:nth-child(3),
.admin-users-table th:nth-child(4),
.admin-users-table th:nth-child(5),
.admin-users-table th:nth-child(6),
.admin-users-table th:nth-child(7) {
    width: 14%;
}

.admin-users-table th:nth-child(8) {
    width: 15%;
}

.admin-users-table th:nth-child(9) {
    width: 150px;
}

.admin-users-table th,
.admin-users-table td {
    padding: 0.58rem 0.7rem;
    border-bottom: 1px solid #e6eef4;
    vertical-align: middle;
}

.admin-users-table th {
    background: #f5f9fc;
    text-align: left;
    white-space: nowrap;
}

.admin-users-table tbody tr:hover {
    background: #f8fbfd;
}

.admin-users-table input,
.admin-users-table select {
    min-width: 0;
}

.admin-users-table small,
.admin-users-form small {
    display: block;
    margin-top: 0.25rem;
    color: #6d7d89;
    font-size: 0.78rem;
    line-height: 1.3;
}

.admin-users-form small {
    margin-top: 0;
    min-height: 34px;
}

.admin-users-cell-stack {
    display: grid;
    grid-template-rows: 26px 40px 34px;
    gap: 0.3rem;
    min-width: 0;
}

.admin-users-cell-spacer {
    display: block;
    min-height: 22px;
}

.admin-users-table td:first-child {
    color: #70818e;
    font-weight: 700;
    width: 70px;
}

.admin-users-mobile-label {
    display: none;
}

.admin-users-id-value {
    display: inline-block;
}

.admin-users-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0 0.35rem 0.35rem 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #edf3f7;
    color: #425665;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}

.admin-users-badge--admin {
    background: #e8f2ff;
    color: #0d5ea8;
}

.admin-users-badge--paid {
    background: #e7f7ee;
    color: #147a42;
}

.admin-users-badge--unpaid {
    background: #fff2df;
    color: #9a5a06;
}

.admin-users-actions {
    vertical-align: top;
}

.admin-users-action-stack form {
    margin: 0;
}

.admin-users-action-stack {
    display: grid;
    gap: 0.45rem;
}

.admin-users-action-stack .btn {
    width: 100%;
    min-height: 38px;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
}

.admin-affiliate-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.admin-affiliate-form .form-group {
    margin-bottom: 0;
}

.admin-affiliate-form label,
.admin-affiliate-card label {
    color: #425665;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-affiliate-form input,
.admin-affiliate-link-row input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-affiliate-list,
.admin-affiliate-request-list {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.admin-affiliate-card,
.admin-affiliate-request {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid #e0e9f0;
    border-radius: 8px;
    background: #ffffff;
}

.admin-affiliate-stats {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
}

.admin-affiliate-stats .admin-users-stat {
    background: #f5f9fc;
    border-color: #dce7ef;
}

.admin-affiliate-stats .admin-users-stat span {
    color: #607283;
}

.admin-affiliate-stats .admin-users-stat strong {
    color: #172635;
}

.admin-affiliate-link-action {
    margin: 0;
}

.admin-affiliate-links {
    display: grid;
    gap: 0.5rem;
}

.admin-affiliate-link-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto auto auto;
    gap: 0.5rem;
    align-items: center;
}

.admin-affiliate-link-row form {
    margin: 0;
}

.admin-affiliate-request {
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-affiliate-request p {
    margin: 0.25rem 0 0;
    color: #607283;
}

@media screen and (max-width: 980px) {
    .admin-users-header,
    .admin-ads-header,
    .admin-settings-header,
    .admin-tiers-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-users-stats {
        width: 100%;
    }

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

    .admin-users-form-action {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 640px) {
    .admin-users-page,
    .admin-ads-page,
    .admin-settings-page,
    .admin-tiers-page {
        width: min(100% - 0.75rem, 1220px);
        margin-top: 0.75rem;
    }

    .admin-users-header,
    .admin-users-create,
    .admin-settings-header,
    .admin-tiers-header {
        padding: 0.85rem;
    }

    .admin-users-header h1,
    .admin-ads-header h1,
    .admin-settings-header h1,
    .admin-tiers-header h1 {
        font-size: 1.45rem;
    }

    .admin-users-create h2,
    .admin-users-list h2,
    .admin-ads-form h2,
    .admin-ads-list h2,
    .admin-settings-preview h2,
    .admin-settings-form h2,
    .admin-settings-reset h2,
    .admin-tiers-create h2,
    .admin-tiers-list h2 {
        font-size: 1.2rem;
    }

    .admin-users-section-title,
    .admin-ads-header,
    .admin-ads-form,
    .admin-ads-list,
    .admin-settings-preview,
    .admin-settings-form,
    .admin-settings-reset,
    .admin-tiers-create,
    .admin-tiers-list {
        padding: 0.85rem;
    }

    .admin-users-section-title {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-users-search {
        width: 100%;
    }

    .admin-users-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .admin-users-stat {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }

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

    .admin-affiliate-link-row,
    .admin-affiliate-request {
        grid-template-columns: 1fr;
    }

    .admin-users-field,
    .admin-users-form-action {
        grid-template-rows: auto auto auto;
    }

    .admin-users-action-spacer,
    .admin-users-form-action small[aria-hidden="true"] {
        display: none;
    }

    .admin-users-table-wrap {
        overflow: visible;
    }

    .admin-users-table,
    .admin-users-table thead,
    .admin-users-table tbody,
    .admin-users-table tr,
    .admin-users-table td {
        display: block;
        width: 100%;
    }

    .admin-users-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
    }

    .admin-users-table thead {
        display: none;
    }

    .admin-users-table tr {
        margin: 0 0.6rem 0.75rem;
        border: 1px solid #dce7ef;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(11, 35, 52, 0.08);
        overflow: hidden;
    }

    .admin-users-table td {
        padding: 0.62rem 0.75rem;
        border-bottom: 1px solid #e6eef4;
    }

    .admin-users-table td:last-child {
        border-bottom: 0;
    }

    .admin-users-table td:first-child {
        display: flex;
        justify-content: space-between;
        width: auto;
        background: #f8fbfd;
    }

    .admin-users-mobile-label {
        display: block;
        margin-bottom: 0.3rem;
        color: #425665;
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .admin-users-table td:first-child .admin-users-mobile-label {
        margin-bottom: 0;
    }

    .admin-users-table input,
    .admin-users-table select {
        min-width: 0;
        width: 100%;
    }

    .admin-users-cell-stack {
        grid-template-rows: auto auto auto;
        gap: 0.25rem;
    }

    .admin-users-cell-spacer {
        display: none;
    }

    .admin-users-badge {
        margin-bottom: 0.35rem;
    }

    .admin-users-actions {
        background: #f8fbfd;
    }

    .admin-users-action-stack .btn,
    .admin-users-action-stack form {
        width: 100%;
    }
}

.admin-ads-page {
    width: min(1180px, calc(100% - 32px));
    margin: 2rem auto 4rem;
    color: #172635;
}

.admin-ads-header,
.admin-ads-form,
.admin-ads-list {
    background: #ffffff;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(11, 35, 52, 0.14);
}

.admin-ads-header {
    margin-bottom: 1rem;
    padding: 1.35rem 1.5rem;
    background: #f8fbfd;
    border-top: 4px solid #00a8d8;
}

.admin-ads-header h1,
.admin-ads-form h2,
.admin-ads-list h2 {
    color: #172635;
    text-align: left;
    text-transform: none;
}

.admin-ads-header p {
    color: #5d6e7d;
    margin: 0;
}

.admin-ads-kicker {
    color: #007fa8;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.admin-ads-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.admin-ads-form,
.admin-ads-list {
    padding: 1.25rem;
}

.admin-ads-form .form-group {
    margin-bottom: 0.9rem;
}

.admin-ads-form label {
    color: #425665;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-ads-form input,
.admin-ads-form select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-ad-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #e6eef4;
}

.admin-ad-card:first-of-type {
    border-top: 0;
}

.admin-ad-card img {
    width: 100%;
    height: 88px;
    object-fit: contain;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    background: #f8fbfd;
}

.admin-ad-card__body {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.admin-ad-card__body h3 {
    margin: 0 0 0.25rem;
    color: #172635;
    font-size: 1rem;
    line-height: 1.25;
}

.admin-ad-card__body p {
    margin: 0;
    color: #687b88;
}

.admin-ad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.admin-ad-actions form {
    margin: 0;
}

.admin-ad-actions .btn {
    min-width: 82px;
    min-height: 38px;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    font-weight: 700;
}

.admin-empty-state {
    margin: 1rem 0 0;
    padding: 1rem;
    border: 1px dashed #bdd0dc;
    border-radius: 8px;
    background: #f8fbfd;
    color: #5d6e7d;
    text-align: center;
}

.admin-settings-page {
    width: min(1180px, calc(100% - 32px));
    margin: 2rem auto 4rem;
    color: #172635;
}

.admin-settings-header {
    margin-bottom: 1rem;
    padding: 1.35rem 1.5rem;
}

.admin-settings-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.admin-settings-preview,
.admin-settings-form,
.admin-settings-reset {
    padding: 1.25rem;
}

.admin-settings-preview {
    grid-row: span 2;
}

.admin-settings-alert {
    margin-bottom: 1rem;
}

.admin-settings-logo-frame {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 160px;
    margin: 1rem 0 0.75rem;
    padding: 1.25rem;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    background: #172635;
}

.admin-settings-logo-frame img {
    display: block;
    width: min(100%, 300px);
    max-height: 110px;
    object-fit: contain;
}

.admin-settings-preview p {
    margin: 0;
    color: #687b88;
}

.admin-settings-form .form-group {
    margin-bottom: 1rem;
}

.admin-settings-form label {
    color: #425665;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-settings-form input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-settings-form small {
    display: block;
    margin-top: 0.4rem;
    color: #687b88;
}

.admin-settings-actions {
    display: flex;
    justify-content: flex-start;
}

.admin-settings-reset {
    display: grid;
    gap: 0.75rem;
}

.admin-settings-reset .btn,
.admin-settings-actions .btn {
    min-height: 38px;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 700;
}

.admin-tiers-page {
    width: min(1240px, calc(100% - 32px));
    margin: 2rem auto 4rem;
    color: #172635;
}

.admin-tiers-header,
.admin-tiers-create,
.admin-tiers-list,
.admin-tier-card {
    padding: 1.25rem;
}

.admin-tiers-alert {
    margin-bottom: 1rem;
    border-radius: 8px;
}

.admin-tiers-create {
    margin-bottom: 1rem;
}

.admin-tiers-list {
    display: grid;
    gap: 1rem;
}

.admin-tiers-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    align-items: start;
}

.admin-tiers-form .form-group {
    margin-bottom: 0;
}

.admin-tiers-form label,
.admin-tiers-checks legend {
    color: #425665;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-tiers-form input,
.admin-tiers-form textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: #172635;
}

.admin-tiers-form textarea {
    min-height: 104px;
    resize: vertical;
}

.admin-tiers-form input:focus,
.admin-tiers-form textarea:focus {
    border-color: #00a8d8;
    box-shadow: 0 0 0 3px rgba(0, 168, 216, 0.14);
    outline: none;
}

.admin-tiers-form__wide,
.admin-tiers-checks,
.admin-tiers-actions,
.admin-tier-card__title {
    grid-column: 1 / -1;
}

.admin-tiers-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin: 0;
    padding: 0.85rem;
    border: 1px solid #dce7ef;
    border-radius: 8px;
    background: #f8fbfd;
}

.admin-tiers-checks legend {
    float: none;
    width: 100%;
    margin-bottom: 0.2rem;
}

.admin-tiers-checks label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: #172635;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: none;
}

.admin-tiers-checks input {
    width: 18px;
    min-height: 18px;
}

.admin-tiers-actions {
    display: flex;
    justify-content: flex-start;
}

.admin-tiers-actions .btn {
    min-height: 40px;
    min-width: 120px;
    border-radius: 6px;
    font-weight: 700;
}

.admin-tier-card {
    border-top: 4px solid #00a8d8;
}

.admin-tier-card__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-tier-card__title p {
    margin: 0 0 0.2rem;
    color: #687b88;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-tier-card__title h3 {
    margin: 0;
    font-size: 1.2rem;
}

@media screen and (max-width: 820px) {
    .admin-ads-layout,
    .admin-ad-card,
    .admin-settings-layout,
    .admin-tiers-form {
        grid-template-columns: 1fr;
    }

    .admin-settings-preview {
        grid-row: auto;
    }

    .admin-ad-card img {
        height: 120px;
    }

    .admin-ad-card__body {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
    }

    .admin-ad-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .admin-ad-actions form,
    .admin-ad-actions .btn,
    .admin-settings-actions .btn,
    .admin-settings-reset .btn,
    .admin-tiers-actions .btn {
        width: 100%;
    }

    .admin-tier-card__title {
        align-items: flex-start;
        flex-direction: column;
    }
}

.public-link-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid #cfe6ff;
    border-radius: 8px;
    background: #f4faff;
}

.public-link-panel p {
    margin: 4px 0 0;
}

.public-memorial {
    color: #12202f;
}

.public-memorial__hero {
    width: min(1120px, calc(100% - 32px));
    margin: 2.5rem auto 1.5rem;
    padding: clamp(2.5rem, 7vw, 5rem) 1.5rem clamp(2rem, 5vw, 3.5rem);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    color: var(--color-text);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.public-memorial__kicker {
    margin-bottom: 10px;
    color: var(--color-primary-variant);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.public-memorial__hero h1 {
    margin-bottom: 16px;
    color: var(--color-text);
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1.05;
}

.public-memorial__hero p {
    color: var(--color-muted);
    font-size: 1.1rem;
}

.public-memorial__grid {
    width: min(1120px, 92%);
    margin: 24px auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.public-memorial__section,
.public-memorial__gallery {
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow-sm);
}

.public-memorial__section h2,
.public-memorial__gallery h2 {
    margin-bottom: 18px;
}

.public-memorial__section ul {
    display: grid;
    gap: 12px;
    padding-left: 0;
}

.public-memorial__section li {
    display: grid;
    gap: 3px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef2f6;
}

.public-memorial__section li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.public-memorial__section span {
    color: #3a4b5f;
}

.public-memorial__gallery {
    width: min(1120px, 92%);
    margin: 18px auto 80px;
}

.public-memorial__photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.public-memorial__photos img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
}

@media screen and (max-width: 900px) {
    .public-memorial__grid {
        grid-template-columns: 1fr;
    }

    .public-link-panel {
        align-items: stretch;
        flex-direction: column;
    }

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

@media screen and (max-width: 560px) {
    .public-memorial__photos {
        grid-template-columns: 1fr;
    }
}

.tiers-page {
    color: #12202f;
}

.tiers-hero {
    padding: 72px 20px 28px;
}

.tiers-hero__content {
    max-width: 920px;
    margin: 0 auto;
    color: white;
    text-align: center;
}

.tiers-kicker {
    margin-bottom: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.tiers-hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.2rem, 6vw, 4.25rem);
    line-height: 1.05;
}

.tiers-hero p {
    font-size: 1.1rem;
}

.tiers-section {
    width: min(1120px, 92%);
    margin: 32px auto 80px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.tier-card {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.tier-card--featured {
    border: 3px solid #00c3f4;
    transform: translateY(-12px);
}

.tier-card__label {
    margin-bottom: 8px;
    color: #0062f4;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.tier-card h2 {
    margin-bottom: 16px;
    font-size: 1.55rem;
}

.tier-card__price {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-left: 4px solid #00c3f4;
    background: #eefaff;
    font-weight: 700;
}

.tier-card ul {
    display: grid;
    gap: 10px;
    padding-left: 0;
}

.tier-card li {
    position: relative;
    padding-left: 24px;
}

.tier-card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 6px;
    width: 8px;
    height: 14px;
    border: solid #168a49;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

@media screen and (max-width: 900px) {
    .tiers-section {
        grid-template-columns: 1fr;
    }

    .tier-card,
    .tier-card--featured {
        min-height: auto;
        transform: none;
    }
}

/* ==============================
   Modern site refresh
   ============================== */

:root {
    --color-primary: #009ac5;
    --color-primary-variant: #0a6d96;
    --color-accent: #16a37c;
    --color-bg: #f4f8fa;
    --color-surface: #ffffff;
    --color-surface-soft: #f8fbfd;
    --color-border: #dce7ef;
    --color-text: #172635;
    --color-muted: #607383;
    --color-danger: #dc3545;
    --color-gradient: linear-gradient(135deg, #f4f8fa 0%, #e9f5f8 48%, #f8fbfd 100%);
    --shadow-sm: 0 8px 24px rgba(11, 35, 52, 0.08);
    --shadow-md: 0 18px 44px rgba(11, 35, 52, 0.14);
}

*,
*::before,
*::after {
    font-family: "Inter", "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: "Inter", "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(0, 154, 197, 0.12), transparent 38%),
        linear-gradient(315deg, rgba(22, 163, 124, 0.10), transparent 34%),
        var(--color-bg);
}

a {
    color: var(--color-primary-variant);
}

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

.site-navbar {
    min-height: 76px;
    background: rgba(24, 34, 43, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(11, 35, 52, 0.16);
    backdrop-filter: blur(16px);
}

.site-navbar .container-fluid {
    gap: 0.75rem;
}

.site-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    min-width: auto;
    padding: 0.2rem 0;
    background: transparent;
    box-shadow: none;
}

.site-navbar .nav-logo-frame {
    display: block;
    width: 260px;
    height: 70px;
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.site-navbar .nav-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.32));
}

.site-navbar .navbar-nav {
    gap: 0.25rem;
}

.site-navbar .nav-link,
.site-navbar .user-menu-toggle {
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem !important;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active,
.site-navbar .user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff !important;
}

.site-navbar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.45rem 0.65rem;
}

.dropdown-menu {
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn {
    border-radius: 6px;
    font-weight: 700;
}

.btn-primary,
.btn-success {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.btn-primary:hover,
.btn-success:hover {
    border-color: var(--color-primary-variant);
    background: var(--color-primary-variant);
}

.btn-secondary {
    border-color: #5f7282;
    background: #5f7282;
}

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

input,
textarea,
select,
.form-control {
    min-height: 44px;
    border: 1px solid #cfdbe4;
    border-radius: 6px;
    background: #ffffff;
    color: var(--color-text);
    font-size: 0.96rem;
}

textarea {
    min-height: 120px;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 154, 197, 0.14);
    outline: none;
}

.form-group label {
    color: #405564;
    font-size: 0.9rem;
    font-weight: 700;
}

.container > .card,
.form-container,
.content-panel {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.form-container {
    width: min(780px, 100%);
    margin: 1.5rem auto 0;
    padding: 1.5rem;
}

.card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.card-body {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.progress {
    height: 0.75rem;
    border-radius: 999px;
    background: #dce7ef;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.step h2,
.card-body > h2,
.tiers-hero h1,
.public-memorial h1 {
    color: var(--color-text);
    letter-spacing: 0;
    text-transform: none;
}

.add-button {
    margin: 0.25rem 0 1.25rem;
    border: 1px solid #bfd2df;
    background: #eef6fa;
    color: var(--color-primary-variant);
    font-weight: 700;
}

.timeline-builder {
    display: grid;
    gap: 1rem;
}

.timeline-builder__header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.timeline-builder__header h3 {
    color: var(--color-text);
    font-size: 1.2rem;
    margin: 0 0 0.25rem;
}

.timeline-builder__header p {
    color: var(--color-muted);
    margin: 0;
}

#life-events-list {
    display: grid;
    gap: 1rem;
}

.timeline-event-card {
    background: #f8fbfd;
    border: 1px solid #d6e4ec;
    border-radius: 8px;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.timeline-event-card__summary {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.timeline-event-card__toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--color-text);
    display: flex;
    flex: 1 1 auto;
    gap: 0.75rem;
    min-width: 0;
    padding: 0;
    text-align: left;
}

.timeline-event-card__toggle:hover {
    opacity: 1;
}

.timeline-event-card__toggle strong,
.timeline-event-card__toggle small {
    display: block;
}

.timeline-event-card__summary-title {
    overflow-wrap: anywhere;
}

.timeline-event-card__summary-meta {
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

.timeline-event-card__chevron {
    border-bottom: 2px solid var(--color-primary-variant);
    border-right: 2px solid var(--color-primary-variant);
    display: inline-block;
    flex: 0 0 10px;
    height: 10px;
    transform: rotate(45deg);
    transition: transform 160ms ease;
    width: 10px;
}

.timeline-event-card.is-collapsed .timeline-event-card__chevron {
    transform: rotate(-45deg);
}

.timeline-event-card__body {
    display: grid;
    gap: 0.85rem;
}

.timeline-event-card.is-collapsed .timeline-event-card__body {
    display: none;
}

.timeline-event-card__top,
.timeline-event-card__actions {
    align-items: end;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.timeline-event-card__top .form-group {
    flex: 1 1 auto;
}

.timeline-event-card__grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 0.55fr) minmax(0, 1fr);
}

.timeline-event-card .form-group {
    margin-bottom: 0;
}

.timeline-event-card textarea {
    min-height: 96px;
}

.timeline-builder__legacy-note {
    background: #fff8e6;
    border: 1px solid #f1d89d;
    border-radius: 8px;
    color: #755a1b;
    font-weight: 700;
    padding: 0.85rem 1rem;
}

.life-timeline,
.public-life-timeline {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
    text-align: left;
}

.life-timeline__event,
.public-life-timeline__event {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d6e4ec;
    border-left: 4px solid var(--color-primary);
    border-radius: 8px;
    color: var(--color-text);
    padding: 1rem;
}

.life-timeline__event h2,
.public-life-timeline__event h3 {
    color: var(--color-text);
    font-size: 1.15rem;
    margin: 0 0 0.45rem;
    text-align: left;
    text-transform: none;
}

.life-timeline__meta,
.public-life-timeline__event > p:first-child {
    color: var(--color-primary-variant);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.life-timeline__place {
    color: var(--color-muted);
    font-weight: 700;
}

@media (max-width: 720px) {
    .timeline-builder__header,
    .timeline-event-card__summary,
    .timeline-event-card__top,
    .timeline-event-card__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .timeline-event-card__grid {
        grid-template-columns: 1fr;
    }
}

.navigation-buttons .d-flex {
    width: 100%;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.navigation-buttons button {
    min-width: 120px;
}

.home-page {
    min-height: calc(100vh - 76px);
    display: grid;
    align-items: center;
    padding: clamp(2rem, 6vw, 5rem) 1rem;
}

.home-hero {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 440px);
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}

.home-hero__content {
    padding: clamp(0.5rem, 2vw, 1rem);
}

.home-kicker,
.auth-card__kicker,
.tiers-kicker {
    color: var(--color-primary-variant);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 720px;
    color: var(--color-text);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.02;
    margin: 0 0 1rem;
    text-align: left;
}

.home-hero__content > p:not(.home-kicker) {
    max-width: 620px;
    color: var(--color-muted);
    font-size: 1.18rem;
    margin-bottom: 1.5rem;
}

.home-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.home-highlights span {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #405564;
    font-size: 0.9rem;
    font-weight: 700;
}

.auth-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
    scroll-margin-top: 96px;
}

.auth-card__header {
    margin-bottom: 1.5rem;
}

.auth-card h2 {
    color: var(--color-text);
    font-size: 1.65rem;
    margin: 0;
    text-align: left;
}

.auth-form .btn {
    width: 100%;
    min-height: 46px;
    margin-top: 0.4rem;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-consent {
    margin: 1rem 0 1.15rem;
}

.auth-consent__label {
    align-items: flex-start;
    background: #f6fafc;
    border: 1px solid #d6e4ec;
    border-radius: 8px;
    color: #405564;
    cursor: pointer;
    display: flex;
    gap: 0.8rem;
    line-height: 1.45;
    padding: 0.9rem 0.95rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-consent__label:hover {
    background: #f1f8fb;
    border-color: #9fd4e5;
}

.auth-consent__label input {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.auth-consent__control {
    align-items: center;
    background: #ffffff;
    border: 2px solid #9fb2c0;
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 22px;
    height: 22px;
    justify-content: center;
    margin-top: 0.1rem;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    width: 22px;
}

.auth-consent__control::after {
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    content: "";
    display: none;
    height: 10px;
    margin-top: -2px;
    transform: rotate(45deg);
    width: 6px;
}

.auth-consent__label input:checked + .auth-consent__control {
    background: #0ea5c6;
    border-color: #0ea5c6;
    box-shadow: 0 0 0 4px rgba(14, 165, 198, 0.14);
}

.auth-consent__label input:checked + .auth-consent__control::after {
    display: block;
}

.auth-consent__label input:focus-visible + .auth-consent__control {
    outline: 3px solid rgba(0, 98, 244, 0.2);
    outline-offset: 2px;
}

.auth-consent__content {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.auth-consent__content strong {
    color: #172635;
    font-size: 0.94rem;
    line-height: 1.25;
}

.auth-consent__content span {
    color: #4f6270;
    font-size: 0.84rem;
    font-weight: 500;
}

.auth-consent__content small {
    color: #728391;
    font-size: 0.78rem;
    font-weight: 700;
}

.auth-switch,
.auth-links {
    margin: 1rem 0 0;
    color: var(--color-muted);
    font-size: 0.94rem;
    text-align: center;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.wrapper {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
}

.wrapper .btn {
    border-radius: 6px;
    background: var(--color-primary);
    color: #ffffff;
}

.input-box input {
    border-radius: 6px;
    border: 1px solid #cfdbe4;
    background: #ffffff;
    color: var(--color-text);
}

.input-box input::placeholder {
    color: #758897;
}

.site-error-card {
    background: #ffffff;
    color: var(--color-text);
}

.site-error-card h1 {
    color: var(--color-text);
}

.px-4.pt-5.my-5.text-center.text-white {
    width: min(980px, calc(100% - 32px));
    margin: 2rem auto !important;
    padding: clamp(1.5rem, 4vw, 3rem) !important;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--color-text) !important;
    box-shadow: var(--shadow-md);
}

.px-4.pt-5.my-5.text-center.text-white h1,
.px-4.pt-5.my-5.text-center.text-white .text-light {
    color: var(--color-text) !important;
}

.px-4.pt-5.my-5.text-center.text-white .lead {
    color: var(--color-muted);
}

.tiers-page {
    color: var(--color-text);
}

.tiers-hero {
    width: min(1120px, calc(100% - 32px));
    margin: 2.5rem auto 1.5rem;
    padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
    box-shadow: var(--shadow-md);
}

.tiers-hero__content {
    color: var(--color-text);
}

.tiers-hero h1 {
    color: var(--color-text);
}

.tiers-hero p {
    color: var(--color-muted);
}

.tiers-card,
.tier-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tier-card {
    background: #ffffff;
}

.tier-card--featured {
    border-color: rgba(0, 154, 197, 0.36);
}

.tier-card__label {
    color: var(--color-primary-variant);
}

.tier-card__price {
    border-left-color: var(--color-primary);
    background: #eef8fb;
    color: var(--color-primary-variant);
}

@media (max-width: 991px) {
    .site-navbar .nav-logo-frame {
        width: 220px;
        height: 59px;
    }

    .site-navbar .navbar-collapse {
        padding-top: 1rem;
    }

    .site-navbar .navbar-nav {
        align-items: stretch;
        gap: 0.35rem;
        text-align: left;
    }

    .home-hero {
        grid-template-columns: 1fr;
    }

    .home-hero h1 {
        font-size: 3rem;
    }

    .home-hero__content > p:not(.home-kicker) {
        font-size: 1.08rem;
    }
}

@media (max-width: 640px) {
    .home-page {
        padding: 0.85rem 0.75rem 1.5rem;
    }

    .home-hero {
        gap: 1rem;
    }

    .home-hero__content {
        padding: 0;
    }

    .home-hero h1 {
        font-size: 2rem;
        line-height: 1.08;
        margin-bottom: 0.65rem;
    }

    .home-kicker,
    .auth-card__kicker {
        margin-bottom: 0.45rem;
    }

    .home-hero__content > p:not(.home-kicker) {
        font-size: 1rem;
        line-height: 1.45;
        margin-bottom: 0.85rem;
    }

    .home-highlights {
        align-items: stretch;
        flex-direction: column;
        gap: 0.45rem;
    }

    .home-highlights span {
        width: 100%;
        padding: 0.48rem 0.65rem;
        font-size: 0.84rem;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-card__header {
        margin-bottom: 1rem;
    }

    .auth-card h2 {
        font-size: 1.45rem;
    }

    .auth-form .form-group {
        margin-bottom: 0.75rem;
    }

    .auth-consent {
        margin: 0.75rem 0 0.85rem;
    }

    .auth-consent__label {
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .auth-consent__content span {
        font-size: 0.8rem;
        line-height: 1.38;
    }

    .navigation-buttons .d-flex {
        flex-direction: column;
    }

    .navigation-buttons button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .site-navbar .nav-logo-frame {
        width: 180px;
        height: 48px;
    }

    .site-navbar .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .home-hero h1 {
        font-size: 1.9rem;
    }
}
