:root {
    --ink: #111111;
    --muted: #667085;
    --paper: #ffffff;
    --card: rgba(255, 255, 255, 0.78);
    --line: #e7e9ee;

    /* PesaFlex accent language */
    --accent: #4f46e5;
    --accent-soft: #eef2ff;
    --accent-border: #e0e7ff;
    --accent-dark: #3730a3;

    --success: #059669;
    --success-soft: #ecfdf5;

    --danger: #b42318;
    --danger-soft: #fef3f2;

    --warn: #a15c00;
    --warn-soft: #fffaeb;

    --shadow: 0 12px 40px rgba(15, 23, 42, .055);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, .09);

    --radius-sm: 9px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background-color: #ffffff;
    background-image:
        radial-gradient(at 0% 0%,
            rgba(238, 242, 255, 0.6) 0px,
            transparent 40%),
        radial-gradient(at 100% 0%,
            rgba(243, 232, 255, 0.5) 0px,
            transparent 40%),
        radial-gradient(at 50% 50%,
            rgba(255, 241, 242, 0.35) 0px,
            transparent 50%);

    background-attachment: fixed;

    color: var(--ink);

    font-family:
        'Plus Jakarta Sans',
        ui-sans-serif,
        system-ui,
        -apple-system,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.code-font,
.timestamp,
.version,
.status-code {
    font-family: 'JetBrains Mono', monospace;
}

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

/* =========================================================
   TOP NAVIGATION
========================================================= */

.topbar {
    height: 72px;

    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(231, 233, 238, 0.85);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 max(22px, calc((100% - 1120px) / 2));

    position: sticky;
    top: 0;
    z-index: 50;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 22px;
    width: auto;
    object-fit: contain;
}


nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    font-weight: 500;
    color: #667085;
}

nav a {
    transition: color .18s ease;
}

nav a:hover {
    color: #111111;
}

.nav-cta {
    background: #111111;
    color: #ffffff;

    padding: 10px 17px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 600;

    transition:
        background .18s ease,
        transform .18s ease;
}

.nav-cta:hover {
    background: #262626;
    color: #ffffff;
    transform: translateY(-1px);
}


/* =========================================================
   LAYOUT
========================================================= */

.container {
    width: 100%;
    max-width: 1120px;

    margin: auto;

    padding: 54px 22px 80px;
}

.hero {
    padding: 62px 0 72px;
    max-width: 900px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .12em;
    text-transform: uppercase;

    color: var(--accent);

    background: var(--accent-soft);
    border: 1px solid var(--accent-border);

    padding: 6px 10px;
    border-radius: 999px;

    margin-bottom: 17px;
}

.hero h1,
.page-head h1,
.form-card h1,
.lesson h1 {
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.04;

    letter-spacing: -.045em;

    margin: 0 0 20px;

    font-weight: 800;
    color: #111111;
}

.lead {
    font-size: 18px;
    color: var(--muted);

    max-width: 760px;

    line-height: 1.75;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;

    margin: 30px 0;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    border: 0;

    border-radius: 999px;

    padding: 13px 20px;

    font-weight: 600;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;

    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.primary {
    background: #111111;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.primary:hover {
    background: #292929;
    color: #ffffff;
}

.ghost {
    border: 1px solid #e2e5ea;
    background: rgba(255, 255, 255, .8);
    color: #111111;
}

.ghost:hover {
    background: #ffffff;
    border-color: #cfd4dc;
}

.full {
    width: 100%;
}


/* =========================================================
   TRUST / VERIFICATION
========================================================= */

.trust {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;

    color: var(--muted);

    font-size: 13px;
}

.trust strong {
    color: #344054;
}


/* =========================================================
   CARDS
========================================================= */

.grid {
    display: grid;
    gap: 18px;
}

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

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

article,
.tile,
.status-card,
.form-card,
.source-box,
.help-card,
.stat {
    background: var(--card);

    border: 1px solid rgba(224, 228, 235, .9);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

article {
    padding: 24px;
}

article:hover {
    border-color: #d8dce5;
}

.icon {
    width: 38px;
    height: 38px;

    border-radius: var(--radius-md);

    background: var(--accent-soft);
    color: var(--accent);

    display: grid;
    place-items: center;

    font-weight: 800;

    border: 1px solid var(--accent-border);
}

.three article h3 {
    margin: 16px 0 7px;

    font-size: 16px;
    letter-spacing: -.015em;
}

.three article p,
.tile span {
    color: var(--muted);
}

/* =========================================================
   IMPORTANT INFORMATION NOTICE
========================================================= */

.notice {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 16px;

    margin: 42px 0 0;
    padding: 20px 22px;

    background: rgba(248, 250, 252, 0.92);

    border: 1px solid #e2e5ea;
    border-left: 3px solid var(--accent);

    border-radius: 14px;

    box-shadow: none;

    color: #344054;
}

.notice-important {
    max-width: 900px;
}

.notice-icon {
    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--accent-soft);
    color: var(--accent);

    border: 1px solid var(--accent-border);
    border-radius: 11px;
}

.notice-icon svg {
    width: 18px;
    height: 18px;
}

.notice-content {
    min-width: 0;
}

.notice-label {
    margin-bottom: 4px;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;

    color: #475467;
}

.notice p {
    margin: 0;

    font-size: 14px;
    line-height: 1.65;

    color: #475467;
}

.notice-footnote {
    margin-top: 8px !important;

    font-size: 12px !important;

    color: #667085 !important;
}

@media (max-width: 600px) {

    .notice {
        gap: 12px;
        padding: 17px;
        margin-top: 32px;
    }

    .notice-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .notice p {
        font-size: 13px;
    }
}

/* =========================================================
   PAGE HEAD
========================================================= */

.page-head {
    display: flex;
    justify-content: space-between;

    gap: 30px;

    align-items: flex-start;

    margin-bottom: 30px;
}

.page-head h1 {
    font-size: 46px;
}

.status-card {
    padding: 18px 20px;
    min-width: 290px;
}

.status-card small {
    display: block;

    color: var(--muted);

    margin-top: 5px;

    font-size: 12px;
}

.dot {
    display: inline-block;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    margin-right: 8px;
}


/* =========================================================
   DASHBOARD TILES
========================================================= */

.tile {
    display: block;

    padding: 21px;

    color: var(--ink);

    text-decoration: none;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.tile:hover {
    transform: translateY(-2px);

    border-color: #d5d9e2;

    box-shadow: 0 18px 50px rgba(15, 23, 42, .08);
}

.tile b,
.tile span {
    display: block;
}

.tile b {
    font-size: 15px;
}

.tile span {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   SECTION TITLES
========================================================= */

.section-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin: 42px 0 14px;
}

.section-title h2 {
    margin: 0;

    font-size: 21px;

    letter-spacing: -.025em;
}


/* =========================================================
   LESSON LIST
========================================================= */

.lesson-list {
    background: rgba(255, 255, 255, .8);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    overflow: hidden;

    box-shadow: var(--shadow);
}

.lesson-row {
    display: grid;

    grid-template-columns: 55px 1fr 30px;

    gap: 14px;

    align-items: center;

    padding: 17px 20px;

    border-bottom: 1px solid var(--line);

    color: var(--ink);

    transition: background .16s ease;
}

.lesson-row:last-child {
    border-bottom: 0;
}

.lesson-row:hover {
    background: #fafbfc;
}

.lesson-row small {
    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-top: 2px;
}

.lesson-num {
    color: var(--accent);

    font-family: 'JetBrains Mono', monospace;

    font-size: 12px;

    font-weight: 500;
}


/* =========================================================
   UPDATES
========================================================= */

.update {
    margin-bottom: 14px;
}

.update small,
.update-meta {
    color: var(--muted);
    font-size: 12px;
}

.update h3 {
    margin: 7px 0;

    font-size: 17px;

    letter-spacing: -.015em;
}

.full-update h2 {
    margin: 10px 0;

    letter-spacing: -.025em;
}

.pill {
    display: inline-flex;
    align-items: center;

    padding: 4px 9px;

    border-radius: 999px;

    background: #f2f4f7;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .01em;
}

.pill.important {
    background: var(--warn-soft);
    color: var(--warn);
}

.pill.warning {
    background: var(--danger-soft);
    color: var(--danger);
}


/* =========================================================
   LESSON READER
========================================================= */

.lesson {
    max-width: 820px;
    margin: auto;
}

.lesson h1 {
    font-size: 48px;
}

.lesson-body {
    font-size: 17px;

    background: rgba(255, 255, 255, .86);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    padding: 34px;

    margin: 28px 0;

    box-shadow: var(--shadow);
}

.lesson-body h2 {
    font-size: 24px;

    letter-spacing: -.025em;

    margin-top: 34px;
}

.lesson-body blockquote {
    border-left: 3px solid var(--accent);

    margin: 24px 0;

    padding: 13px 18px;

    background: #f8f9ff;

    color: #344054;

    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


/* =========================================================
   SOURCES
========================================================= */

.source-box {
    padding: 18px;

    margin: 20px 0;

    background: rgba(248, 250, 252, .8);
}

.source-box small {
    display: block;

    color: var(--muted);

    margin-top: 5px;

    font-size: 12px;
}


/* =========================================================
   FORMS
========================================================= */

.form-card {
    max-width: 540px;

    margin: 30px auto;

    padding: 30px;
}

.form-card.wide {
    max-width: 760px;
}

.form-card h1 {
    font-size: 40px;
}

.form-card label,
.admin-form label {
    display: block;

    font-weight: 700;

    font-size: 13px;

    margin: 17px 0;

    color: #344054;
}

.form-card input,
.admin-form input,
.admin-form select,
.form-card textarea,
.admin-form textarea,
.help-card textarea {
    display: block;

    width: 100%;

    margin-top: 7px;

    border: 1px solid #d0d5dd;

    border-radius: var(--radius-md);

    padding: 12px 13px;

    font: inherit;

    font-size: 14px;

    background: rgba(255, 255, 255, .9);

    color: #111111;

    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.form-card input:focus,
.admin-form input:focus,
.admin-form select:focus,
.form-card textarea:focus,
.admin-form textarea:focus,
.help-card textarea:focus {
    outline: none;

    border-color: #818cf8;

    box-shadow: 0 0 0 3px rgba(99, 102, 241, .10);
}


/* =========================================================
   ALERTS
========================================================= */

.alert {
    padding: 12px 14px;

    border-radius: var(--radius-md);

    margin: 14px 0;

    font-size: 13px;
}

.danger {
    background: var(--danger-soft);
    color: #7a271a;
}

.success {
    background: var(--success-soft);
    color: #067647;
}


/* =========================================================
   GENERAL UTILITIES
========================================================= */

.small {
    font-size: 12px;
    color: var(--muted);
}

.price {
    font-size: 44px;

    font-weight: 800;

    letter-spacing: -.04em;

    margin: 10px 0 18px;
}

.examples {
    margin-top: 22px;

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    align-items: center;
}

.examples button {
    border: 1px solid var(--line);

    background: rgba(255, 255, 255, .8);

    border-radius: 999px;

    padding: 8px 12px;

    cursor: pointer;

    font-family: inherit;

    font-size: 12px;

    transition:
        border-color .18s ease,
        background .18s ease;
}

.examples button:hover {
    border-color: #cdd2dc;
    background: #ffffff;
}


/* =========================================================
   ADMIN
========================================================= */

.admin-grid {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 14px;
}

.stat {
    padding: 20px;
}

.stat strong {
    font-size: 28px;

    display: block;

    letter-spacing: -.035em;
}

.stat span {
    text-transform: capitalize;

    color: var(--muted);

    font-size: 12px;
}

.admin-form {
    background: rgba(255, 255, 255, .85);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    padding: 25px;

    margin-bottom: 25px;

    box-shadow: var(--shadow);
}

.table-wrap {
    background: rgba(255, 255, 255, .88);

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    overflow: auto;

    box-shadow: var(--shadow);
}

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

th,
td {
    text-align: left;

    padding: 13px 15px;

    border-bottom: 1px solid var(--line);

    font-size: 13px;
}

th {
    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: .06em;

    color: #667085;

    background: #fafbfc;
}


/* =========================================================
   HELP
========================================================= */

.help-card {
    margin-bottom: 15px;

    overflow: hidden;
}

.answer {
    background: #f8f9ff;

    border-left: 3px solid var(--accent);

    border-radius: 0 var(--radius-md) var(--radius-md) 0;

    padding: 14px;

    margin-top: 12px;
}

.answer p {
    margin: 6px 0;
}


/* =========================================================
   STACK
========================================================= */

.stack {
    display: grid;
    gap: 12px;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    border-top: 1px solid var(--line);

    background: rgba(255, 255, 255, .75);

    padding: 28px max(22px, calc((100% - 1120px) / 2));

    display: flex;

    justify-content: space-between;

    gap: 20px;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {

    .three,
    .two,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        height: 64px;

        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar nav a:not(.nav-cta) {
        display: none;
    }

    .container {
        padding: 35px 16px 60px;
    }

    .hero {
        padding: 38px 0 50px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .lead {
        font-size: 17px;
    }

    .page-head {
        display: block;
    }

    .status-card {
        margin-top: 20px;

        min-width: 0;
    }

    .page-head h1 {
        font-size: 38px;
    }

    .lesson h1 {
        font-size: 38px;
    }

    .lesson-body {
        padding: 22px;

        font-size: 17px;
    }

    .lesson-row {
        grid-template-columns: 40px 1fr 20px;
    }

    footer {
        display: block;
    }

    footer div+div {
        margin-top: 10px;
    }
}