:root {
    --ink: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --purple: #7c3aed;
    --pink: #db2777;
    --radius: 0.75rem;
    --shadow: 0 16px 42px rgb(15 23 42 / 0.1);
    color-scheme: light;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    color: var(--ink);
    background: var(--surface);
    font-synthesis: none;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    line-height: 1.6;
}

main {
    flex: 1;
    padding-block: 1rem 4rem;
}

img {
    max-width: 100%;
    height: auto;
}

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

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

.container {
    width: min(100% - 2rem, 1280px);
    margin-inline: auto;
}

.narrow {
    max-width: 820px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.7rem 1rem;
    color: white;
    background: var(--ink);
    border-radius: 0.5rem;
    transform: translateY(-150%);
}

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

.site-header {
    position: relative;
    z-index: 20;
    background: rgb(255 255 255 / 0.96);
    border-bottom: 1px solid #f1f5f9;
}

.navbar {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    flex: 0 0 auto;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 650;
    text-decoration: none;
}

.brand img {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a,
.nav-dropdown > button {
    display: inline-flex;
    align-items: center;
    min-height: 2.6rem;
    padding: 0.55rem 0.75rem;
    color: #334155;
    background: transparent;
    border: 0;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a[aria-current="page"],
.nav-dropdown > button:hover {
    color: var(--primary-dark);
    background: #eff6ff;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown ul {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    width: 18rem;
    display: none;
    margin: 0;
    padding: 0.45rem;
    list-style: none;
    background: white;
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    box-shadow: var(--shadow);
}

.nav-dropdown.is-open ul,
.nav-dropdown:focus-within ul {
    display: block;
}

.nav-dropdown li a {
    width: 100%;
    min-height: auto;
    padding: 0.7rem 0.75rem;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-left: auto;
}

.account-actions form {
    margin: 0;
}

.account-name {
    max-width: 12rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-toggle {
    width: 2.8rem;
    height: 2.8rem;
    display: none;
    place-content: center;
    gap: 0.28rem;
    margin-left: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
}

.nav-toggle > span:not(.sr-only) {
    width: 1.25rem;
    height: 2px;
    display: block;
    background: #334155;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.75rem;
    padding: 0.68rem 1.1rem;
    color: white;
    background: var(--primary);
    border: 1px solid transparent;
    border-radius: 0.6rem;
    box-shadow: 0 4px 12px rgb(37 99 235 / 0.18);
    font-weight: 650;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.button:hover {
    color: white;
    background: var(--primary-dark);
    box-shadow: 0 7px 18px rgb(37 99 235 / 0.28);
    transform: translateY(-1px);
}

.button-small {
    min-height: 2.2rem;
    padding: 0.5rem 0.8rem;
    font-size: 0.875rem;
}

.button-secondary {
    color: #334155;
    background: white;
    border-color: var(--line);
    box-shadow: none;
}

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

.button-gradient {
    background: linear-gradient(115deg, var(--purple), var(--pink));
    box-shadow: 0 8px 24px rgb(124 58 237 / 0.3);
}

.button-gradient:hover {
    background: linear-gradient(115deg, #6d28d9, #be185d);
}

.hero {
    padding-inline: 0;
}

.hero-media {
    position: relative;
    min-height: clamp(240px, 42vw, 576px);
    overflow: hidden;
    border-radius: var(--radius);
    background: #334155;
}

.hero-media > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(15 23 42 / 0.56), rgb(15 23 42 / 0.22));
}

.hero-copy {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    width: min(85%, 880px);
    padding: clamp(1rem, 3vw, 2rem);
    color: white;
    text-align: center;
    background: rgb(15 23 42 / 0.25);
    border: 1px solid rgb(255 255 255 / 0.12);
    border-radius: var(--radius);
    backdrop-filter: blur(2px);
    transform: translate(-50%, -50%);
}

.hero-copy h1 {
    max-width: 900px;
    margin: 0.25rem auto 0;
    font-size: clamp(1.45rem, 4vw, 3.5rem);
    line-height: 1.12;
    text-wrap: balance;
}

.hero-kicker,
.hero-subtitle {
    margin: 0;
    font-size: clamp(0.9rem, 1.7vw, 1.25rem);
}

.hero-cta {
    margin-top: clamp(1rem, 2.5vw, 2rem);
}

.page-header {
    padding-block: clamp(3rem, 8vw, 7rem) clamp(2rem, 5vw, 4rem);
    text-align: center;
}

.page-header h1,
.page-content > h1 {
    margin: 0.25rem 0 1rem;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.eyebrow {
    margin: 0 0 0.4rem;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lead {
    max-width: 820px;
    margin-inline: auto;
    color: #475569;
    font-size: clamp(1.08rem, 2vw, 1.35rem);
    line-height: 1.7;
}

.content-stream,
.page-content {
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

.prose {
    color: #334155;
    font-size: 1.05rem;
}

.prose h2,
.section-heading {
    margin: 2.5rem 0 1rem;
    color: var(--ink);
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.2;
}

.prose h3 {
    margin-top: 2rem;
    color: var(--ink);
    font-size: 1.35rem;
}

.prose p,
.prose li {
    max-width: 78ch;
}

.prose blockquote {
    margin-inline: 0;
    padding-left: 1.25rem;
    border-left: 4px solid #c4b5fd;
    color: #475569;
}

.content-image {
    margin: 2rem 0;
}

.content-image img {
    width: 100%;
    border-radius: var(--radius);
}

.feature-row {
    display: grid;
    grid-template-columns: minmax(5rem, 9rem) 1fr;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding: clamp(1.5rem, 4vw, 3rem);
    margin-block: 1.5rem;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.feature-row img {
    width: 100%;
    max-height: 8rem;
    object-fit: contain;
}

.feature-row h2 {
    margin: 0 0 0.5rem;
}

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

.card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 26px rgb(15 23 42 / 0.06);
}

.card > a img {
    width: 100%;
    aspect-ratio: 12 / 7;
    display: block;
    object-fit: cover;
}

.card-body {
    padding: 1.35rem;
}

.card-body time,
.list-card time {
    color: var(--muted);
    font-size: 0.85rem;
}

.card-body h2,
.list-card h3,
.event-card h2 {
    margin: 0.45rem 0;
    line-height: 1.25;
}

.card-body h2 a,
.list-card h3 a,
.event-card h2 a {
    color: var(--ink);
    text-decoration: none;
}

.card-body h2 a:hover,
.list-card h3 a:hover,
.event-card h2 a:hover {
    color: var(--primary-dark);
}

.text-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 700;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 3rem;
    text-align: center;
    background: var(--surface-soft);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
}

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

.list-card,
.event-card {
    padding: 1.35rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.badge {
    display: inline-flex;
    margin-right: 0.5rem;
    padding: 0.2rem 0.55rem;
    color: #6b21a8;
    background: #f3e8ff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.internal-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
    gap: 2rem;
    align-items: start;
}

.internal-layout h2 {
    margin-top: 0;
}

.docs-panel,
.registration-card {
    padding: 1.5rem;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.docs-panel ul,
.child-pages ul,
.archive-list {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.2rem;
}

.event-card {
    display: grid;
    grid-template-columns: 6rem 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.event-date {
    display: grid;
    place-items: center;
    padding: 0.75rem;
    color: #5b21b6;
    background: #ede9fe;
    border-radius: 0.75rem;
}

.event-date strong {
    font-size: 2.2rem;
    line-height: 1;
}

.event-date span {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.archive-list {
    padding: 0;
    list-style: none;
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.8rem;
    border-bottom: 1px solid var(--line);
}

.seminar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(19rem, 0.8fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    padding-block: clamp(2.5rem, 6vw, 5rem);
}

.registration-card {
    position: sticky;
    top: 1rem;
    background: white;
    box-shadow: var(--shadow);
}

.registration-card h2 {
    margin-top: 0;
}

.event-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 0 0 2rem;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.event-facts div {
    padding: 1rem;
    background: var(--surface-soft);
}

.event-facts dt {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.event-facts dd {
    margin: 0.2rem 0 0;
    color: var(--ink);
    font-weight: 650;
}

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

.form-field,
.stack-form > div {
    display: grid;
    gap: 0.35rem;
}

.form-field label,
.stack-form > div > label {
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
}

.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field textarea,
.form-field select,
.stack-form input:not([type="checkbox"]):not([type="radio"]),
.stack-form textarea,
.stack-form select,
.search-form input {
    width: 100%;
    min-height: 2.85rem;
    padding: 0.65rem 0.75rem;
    color: var(--ink);
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
}

.form-field textarea,
.stack-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus,
.search-form input:focus {
    border-color: #818cf8;
    outline: 3px solid rgb(129 140 248 / 0.22);
}

.form-field small {
    color: var(--muted);
}

.errorlist,
.form-error {
    margin: 0;
    padding: 0.65rem 0.85rem;
    color: #991b1b;
    background: #fef2f2;
    border-radius: 0.45rem;
    list-style: none;
}

.notice {
    padding: 0.9rem 1rem;
    color: #854d0e;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 0.5rem;
}

.confirmation,
.auth-shell {
    display: grid;
    place-items: center;
    min-height: 65vh;
    padding-block: 3rem;
    text-align: center;
}

.confirmation {
    max-width: 720px;
}

.confirmation-icon {
    width: 5rem;
    height: 5rem;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    color: #166534;
    background: #dcfce7;
    border-radius: 999px;
    font-size: 2.2rem;
    font-weight: 800;
}

.auth-card {
    width: min(100%, 30rem);
    padding: clamp(1.5rem, 5vw, 3rem);
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-card > img {
    width: 5.5rem;
}

.auth-card h1 {
    margin: 0.25rem 0 1.5rem;
    font-size: 2.3rem;
}

.auth-card .stack-form {
    margin-bottom: 1rem;
    text-align: left;
}

.search-form {
    max-width: 50rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}

.search-results {
    max-width: 50rem;
    margin-top: 2rem;
}

.site-footer {
    padding-block: 2rem;
    color: #64748b;
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
}

.footer-inner,
.footer-inner nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.footer-inner p {
    margin: 0;
}

.footer-inner a {
    color: #475569;
}

.cookie-banner {
    position: fixed;
    z-index: 50;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: #475569;
    background: rgb(255 255 255 / 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-copy {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-copy img {
    width: 1.5rem;
    height: 1.5rem;
}

@media (max-width: 1050px) {
    .nav-toggle {
        display: grid;
    }

    .navbar {
        flex-wrap: wrap;
        padding-block: 0.8rem;
    }

    .nav-content {
        width: 100%;
        display: none;
        flex-basis: 100%;
        align-items: stretch;
        padding-bottom: 0.5rem;
    }

    .nav-content.is-open {
        display: grid;
    }

    .nav-links {
        display: grid;
    }

    .nav-links a,
    .nav-dropdown > button {
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown ul {
        position: static;
        width: auto;
        margin-left: 1rem;
        box-shadow: none;
    }

    .account-actions {
        justify-content: flex-start;
        margin: 0;
        padding-top: 0.75rem;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 800px) {
    .card-grid,
    .internal-layout,
    .seminar-layout {
        grid-template-columns: 1fr;
    }

    .registration-card {
        position: static;
    }

    .event-card {
        grid-template-columns: 4.5rem 1fr;
    }

    .event-card > .button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    main {
        padding-top: 0.5rem;
    }

    .container {
        width: min(100% - 1rem, 1280px);
    }

    .hero-media {
        min-height: 240px;
    }

    .hero-copy {
        width: 92%;
        padding: 1rem;
    }

    .hero-cta {
        position: static;
        margin-top: 1rem;
        transform: none;
    }

    .feature-row {
        grid-template-columns: 4rem 1fr;
        padding: 1rem;
    }

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

    .footer-inner,
    .footer-inner nav,
    .cookie-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .cookie-banner .button {
        width: 100%;
    }
}

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