:root {
    --bg: #edf2f4;
    --bg-soft: #f8fafb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --border: rgba(17, 36, 53, 0.12);
    --text: #132331;
    --muted: #5f7181;
    --accent: #0f6d6d;
    --accent-deep: #0d4d55;
    --danger: #ad3f3f;
    --warn: #8d5c18;
    --success: #216b4f;
    --shadow: 0 22px 50px rgba(18, 34, 49, 0.09);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(15, 109, 109, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(19, 35, 49, 0.14), transparent 34%),
        linear-gradient(180deg, #eef4f4 0%, #e7ecef 100%);
}

body {
    margin: 0;
    color: var(--text);
    font: 16px/1.6 "Aptos", "Segoe UI", sans-serif;
}

a {
    color: var(--accent-deep);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(19, 35, 49, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 35, 49, 0.03) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 82%);
}

.shell {
    width: min(1120px, calc(100vw - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(16px);
    background: rgba(237, 242, 244, 0.86);
    border-bottom: 1px solid var(--border);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    font: 700 1.15rem/1 "Aptos Display", "Segoe UI", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

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

.nav-cta,
.button,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.82rem 1.2rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.nav-cta,
.button {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 109, 109, 0.18);
}

.button-secondary {
    background: transparent;
    color: var(--accent-deep);
    border-color: rgba(13, 77, 85, 0.22);
}

.button-danger {
    background: linear-gradient(135deg, #be5a54 0%, #a63d3d 100%);
    color: #fff;
}

.button:hover,
.button-secondary:hover,
.button-danger:hover,
.nav-cta:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.link-button {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-deep);
    cursor: pointer;
}

.nav-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 77, 85, 0.18);
    background: rgba(255, 255, 255, 0.72);
}

.danger-link {
    color: var(--danger);
}

.inline-form {
    display: inline;
}

.page-body {
    padding: 2rem 0 4rem;
}

.hero,
.dashboard-grid,
.account-grid,
.info-strip,
.auth-grid {
    display: grid;
    gap: 1.5rem;
}

.hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
    padding-top: 1rem;
}

.hero h1,
.page-heading h1,
.auth-shell h1,
.auth-grid h1,
.message-card h1 {
    margin: 0.2rem 0 0.8rem;
    font: 700 clamp(2.3rem, 4vw, 4.4rem)/1.05 "Iowan Old Style", Georgia, serif;
    letter-spacing: -0.03em;
}

.lede {
    max-width: 58ch;
    color: var(--muted);
    margin: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    color: var(--accent-deep);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-points,
.info-strip {
    margin-top: 1.5rem;
}

.hero-auth {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.hero-points {
    display: grid;
    gap: 1rem;
}

.hero-points-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.card {
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.metric-card {
    padding: 1rem 1.15rem;
}

.metric-card strong {
    display: block;
    margin-bottom: 0.4rem;
}

.metric-card span,
.muted,
.profile-list dd,
.site-footer {
    color: var(--muted);
}

.card {
    padding: 1.35rem;
}

.feature-panel {
    display: grid;
    gap: 1rem;
}

.auth-card {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.process-grid {
    display: grid;
    gap: 0.9rem;
}

.process-list {
    display: grid;
    gap: 0.9rem;
}

.process-step {
    border-radius: 18px;
    padding: 1rem 1.05rem;
    background: rgba(15, 109, 109, 0.06);
    border: 1px solid rgba(15, 109, 109, 0.12);
}

.process-step strong {
    display: block;
    margin-bottom: 0.3rem;
}

.process-step p {
    margin: 0;
    color: var(--muted);
}

.callout-card {
    display: grid;
    gap: 0.8rem;
}

.callout-card h3 {
    margin: 0;
}

.card-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.6rem;
}

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

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

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

.tone-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 251, 0.9));
}

.compact-card {
    min-height: 100%;
}

.auth-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: stretch;
}

.auth-side,
.auth-form-card {
    display: grid;
    align-content: start;
    gap: 1rem;
}

.feature-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.compact-list {
    gap: 0.55rem;
}

.narrow {
    max-width: 640px;
    margin: 0 auto;
}

.form-card h2,
.list-card h2,
.card h2 {
    margin-top: 0;
    font: 700 1.45rem/1.2 "Aptos Display", "Segoe UI", sans-serif;
}

.stack-form,
.button-row {
    display: grid;
    gap: 1rem;
}

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

label {
    display: grid;
    gap: 0.4rem;
    color: var(--text);
}

label span {
    font-weight: 600;
    font-size: 0.94rem;
}

input,
select,
textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(18, 34, 49, 0.14);
    background: rgba(255, 255, 255, 0.94);
    padding: 0.82rem 0.95rem;
    color: var(--text);
}

textarea {
    resize: vertical;
    min-height: 10rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 109, 109, 0.2);
    border-color: rgba(15, 109, 109, 0.45);
}

.flash {
    margin-bottom: 1rem;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(33, 107, 79, 0.11);
    border-color: rgba(33, 107, 79, 0.16);
}

.flash-error {
    background: rgba(173, 63, 63, 0.11);
    border-color: rgba(173, 63, 63, 0.16);
}

.error-text {
    color: var(--danger);
}

.error-banner {
    border-radius: 14px;
    padding: 0.85rem 1rem;
    background: rgba(173, 63, 63, 0.09);
    border: 1px solid rgba(173, 63, 63, 0.18);
    color: var(--danger);
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-grid,
.account-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
}

.list-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

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

.reminder-item {
    border-top: 1px solid rgba(18, 34, 49, 0.08);
    padding-top: 1rem;
}

.reminder-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.reminder-meta,
.reminder-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.reminder-actions {
    margin-top: 0.8rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(15, 109, 109, 0.08);
    color: var(--accent-deep);
    font-size: 0.88rem;
    font-weight: 600;
}

.status-sent,
.is-success {
    background: rgba(33, 107, 79, 0.12);
    color: var(--success);
}

.status-failed,
.status-cancelled {
    background: rgba(173, 63, 63, 0.12);
    color: var(--danger);
}

.status-pending_confirmation,
.is-warn {
    background: rgba(141, 92, 24, 0.12);
    color: var(--warn);
}

.status-scheduled,
.status-sending {
    background: rgba(15, 109, 109, 0.08);
    color: var(--accent-deep);
}

.profile-list {
    display: grid;
    gap: 1rem;
    margin: 0 0 1rem;
}

.profile-list dt {
    font-weight: 700;
}

.danger-card {
    border-color: rgba(173, 63, 63, 0.16);
}

.verification-card {
    margin-bottom: 1.5rem;
    border-color: rgba(141, 92, 24, 0.22);
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.96), rgba(255, 248, 235, 0.9));
}

.verification-card h2 {
    margin-bottom: 0.35rem;
}

.message-card,
.auth-shell {
    padding-top: 2rem;
}

.auth-shell {
    display: grid;
    place-items: center;
}

.empty-state {
    padding: 2.5rem 0 1rem;
    text-align: center;
    color: var(--muted);
}

.site-footer {
    padding-bottom: 2rem;
}

@media (max-width: 900px) {
    .hero,
    .dashboard-grid,
    .account-grid,
    .info-strip,
    .feature-grid,
    .auth-grid,
    .field-grid,
    .hero-points-compact,
    .info-strip-three {
        grid-template-columns: 1fr;
    }

    .page-heading,
    .header-row,
    .list-header {
        align-items: start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .nav a,
    .nav .inline-form {
        width: 100%;
    }

    .nav .link-button,
    .nav-cta {
        width: 100%;
        justify-content: center;
    }

    .nav-link-button {
        width: 100%;
        padding: 0.82rem 1.2rem;
    }

    .card,
    .metric-card {
        padding: 1.15rem;
    }

    .hero-actions {
        display: grid;
    }

    .hero-actions a {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .shell {
        width: min(100vw - 1.2rem, 1120px);
    }

    .page-body {
        padding: 1.35rem 0 3rem;
    }

    .hero h1,
    .page-heading h1,
    .auth-shell h1,
    .auth-grid h1,
    .message-card h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .button,
    .button-secondary,
    .button-danger,
    .nav-cta {
        width: 100%;
    }
}
