:root {
    --ink: #17211c;
    --muted: #66736d;
    --line: #dfe6e1;
    --paper: #f7f9f6;
    --white: #ffffff;
    --green: #235b45;
    --green-2: #2f755b;
    --teal: #246f78;
    --gold: #b78b2c;
    --red: #b84343;
    --shadow: 0 20px 60px rgba(23, 33, 28, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

.brand {
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 800;
}

.site-header {
    align-items: center;
    background: rgba(247, 249, 246, .92);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 18px clamp(18px, 4vw, 56px);
    position: sticky;
    top: 0;
    z-index: 5;
}

.site-header nav {
    align-items: center;
    display: flex;
    gap: 18px;
}

.button,
button {
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    padding: 12px 18px;
}

.button-pill .button,
.button-pill button,
.button-pill input,
.button-pill select,
.button-pill textarea {
    border-radius: 999px;
}

.button-square .button,
.button-square button,
.button-square input,
.button-square select,
.button-square textarea {
    border-radius: 4px;
}

.button,
.primary {
    background: var(--green);
    color: var(--white);
}

.danger {
    background: var(--red);
    color: var(--white);
}

.button.secondary,
.ghost {
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--ink);
}

.button.small {
    padding: 9px 13px;
}

.small {
    padding: 9px 13px;
}

.full {
    width: 100%;
}

.hero {
    display: grid;
    gap: 42px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr);
    min-height: calc(100vh - 74px);
    padding: clamp(42px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.hero-copy {
    align-self: center;
    max-width: 780px;
}

.eyebrow {
    color: var(--teal);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 0 0 12px;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6.8rem);
    letter-spacing: 0;
    line-height: .94;
    margin-bottom: 24px;
}

.lede {
    color: var(--muted);
    font-size: 1.22rem;
    max-width: 720px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-panel {
    align-items: center;
    display: flex;
}

.mini-window {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 28px;
    width: 100%;
}

.window-bar {
    background: linear-gradient(90deg, var(--green), var(--teal), var(--gold));
    border-radius: 99px;
    height: 10px;
    margin-bottom: 22px;
    width: 140px;
}

.section,
.workflow {
    padding: 70px clamp(18px, 5vw, 72px);
}

.section-heading {
    max-width: 760px;
}

.section-heading h2,
.workflow h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.feature-grid,
.module-grid,
.stat-grid {
    display: grid;
    gap: 16px;
}

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

.feature-grid article,
.module-grid article,
.stat-grid article,
.panel,
.auth-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.card-soft_shadow .panel,
.card-soft_shadow .auth-panel,
.card-soft_shadow .list-item,
.card-soft_shadow .feature-grid article,
.card-soft_shadow .module-grid article,
.card-soft_shadow .stat-grid article {
    box-shadow: var(--shadow);
}

.card-flat .panel,
.card-flat .auth-panel,
.card-flat .list-item {
    box-shadow: none;
}

.card-outlined .panel,
.card-outlined .auth-panel,
.card-outlined .list-item {
    border-width: 2px;
    box-shadow: none;
}

.steps {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.steps span {
    background: var(--ink);
    border-radius: 8px;
    color: var(--white);
    font-weight: 800;
    padding: 16px;
    text-align: center;
}

.auth-page,
.setup-page {
    background: linear-gradient(120deg, #eef4f0, #f9f8f1);
}

.login-blue_gradient {
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
}

.login-green_gradient {
    background: linear-gradient(135deg, #ecfdf5, #dcfce7);
}

.login-warm_gradient {
    background: linear-gradient(135deg, #fff1f2, #ffedd5);
}

.login-gold_gradient {
    background: linear-gradient(135deg, #fefce8, #f5f5f4);
}

.login-clean {
    background: var(--paper);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 28px;
    place-items: center;
}

.auth-panel {
    box-shadow: var(--shadow);
    max-width: 520px;
    width: 100%;
}

.login-logo {
    display: block;
    margin-bottom: 16px;
    max-height: 64px;
    max-width: 220px;
    object-fit: contain;
}

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

label {
    color: var(--muted);
    display: grid;
    font-size: .9rem;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    padding: 12px 13px;
    width: 100%;
}

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

.alert {
    border-radius: 8px;
    margin: 14px 0;
    padding: 12px;
}

.alert.error {
    background: #fff1f1;
    color: var(--red);
}

.alert.success {
    background: #eef8f2;
    color: var(--green);
}

.alert code {
    background: var(--white);
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
    padding: 10px;
}

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

.app-page {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-tagline {
    color: color-mix(in srgb, var(--sidebar-text) 72%, transparent);
    font-size: .84rem;
    margin-top: -18px;
}

.sidebar-project {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    color: var(--sidebar-text);
    padding: 10px;
}

.sidebar-project select {
    background: rgba(255, 255, 255, .94);
}

.side-nav {
    display: grid;
    gap: 6px;
}

.side-nav a {
    border-radius: 8px;
    color: var(--sidebar-text);
    font-weight: 700;
    padding: 10px 12px;
}

.side-nav a.active,
.side-nav a:hover {
    background: rgba(255, 255, 255, .12);
}

.workspace {
    padding: 32px;
}

.app-brand {
    align-items: center;
    color: var(--sidebar-text);
    display: flex;
    gap: 12px;
}

.app-brand img {
    max-height: 42px;
    max-width: 160px;
    object-fit: contain;
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--green), var(--teal));
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 46px;
    justify-content: center;
    min-width: 46px;
    padding: 0 10px;
}

.app-topbar {
    align-items: center;
    background: color-mix(in srgb, var(--white) 86%, transparent);
    border: 1px solid var(--line);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 14px 44px rgba(15, 23, 42, .08);
    display: flex;
    justify-content: space-between;
    margin: -32px -32px 28px;
    padding: 22px 32px;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 10px;
}

.user-pill {
    background: color-mix(in srgb, var(--green) 10%, var(--white));
    border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line));
    border-radius: 999px;
    color: var(--green);
    font-weight: 800;
    padding: 10px 14px;
}

.app-footer {
    color: var(--muted);
    padding: 24px 0 0;
}

.workspace-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.workspace-header h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.stat-grid span {
    display: block;
    font-size: 2rem;
    font-weight: 900;
}

.module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.workspace-form {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-form .wide {
    grid-column: 1 / -1;
}

.project-switcher {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(180px, 260px) auto;
}

.item-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.item-main {
    min-width: 0;
    width: 100%;
}

.list-item,
.empty-state {
    align-items: flex-start;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 20px;
}

.empty-state {
    display: block;
}

.actions.vertical {
    align-items: stretch;
    flex-direction: column;
}

.preline {
    white-space: pre-line;
}

.callout {
    background: #f2f6f4;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 12px;
    padding: 14px;
}

.callout strong {
    display: block;
    margin-bottom: 5px;
}

.compact {
    margin-top: 16px;
}

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

.recorder-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 18px;
}

.panel-heading.split {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.export-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

pre {
    background: #111915;
    border-radius: 8px;
    color: #eef8f2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .88rem;
    line-height: 1.55;
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    white-space: pre-wrap;
}

.checkbox {
    align-content: center;
    display: flex;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

.panel-heading,
.token-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.token-form {
    grid-template-columns: 1fr 180px 160px;
    margin: 18px 0;
}

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

.grid-sort {
    background: transparent;
    color: var(--ink);
    justify-content: flex-start;
    padding: 0;
}

.grid-sort::after {
    content: " sort";
    font-size: .8rem;
    margin-left: 7px;
}

.grid-sort[data-direction="asc"]::after {
    content: " asc";
}

.grid-sort[data-direction="desc"]::after {
    content: " desc";
}

.grid-filters input {
    padding: 8px 9px;
}

.brand-preview {
    border-left: 6px solid var(--green);
}

.branding-board {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr);
    margin-bottom: 18px;
}

.branding-board > .panel {
    min-width: 0;
}

.theme-gallery {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    text-align: left;
}

.theme-card:hover {
    border-color: var(--green);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
}

.theme-swatch {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 116px;
    overflow: hidden;
}

.theme-mini-sidebar {
    background: var(--swatch-sidebar);
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 16px;
}

.theme-mini-sidebar i {
    background: color-mix(in srgb, var(--swatch-secondary) 72%, #fff);
    border-radius: 999px;
    height: 12px;
    width: 46px;
}

.theme-mini-main {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
}

.theme-mini-main b {
    background: var(--swatch-primary);
    border-radius: 999px;
    display: block;
    height: 18px;
    width: 74%;
}

.theme-mini-main b:nth-child(2) {
    background: var(--swatch-accent);
    width: 44%;
}

.theme-mini-main em {
    background: linear-gradient(90deg, var(--swatch-accent), var(--swatch-secondary));
    border-radius: 10px;
    display: block;
    height: 46px;
    width: 100%;
}

.theme-card h3 {
    margin-bottom: 0;
}

.theme-card p {
    color: var(--muted);
    margin-bottom: auto;
}

.theme-card .primary {
    align-self: flex-start;
}

.brand-live-preview {
    background: var(--preview-bg);
    border: 1px solid var(--line);
    border-radius: 18px;
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    min-height: 420px;
    overflow: hidden;
}

.brand-live-preview aside {
    background: var(--preview-sidebar);
    color: var(--preview-sidebar-text);
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 24px;
}

.preview-avatar {
    align-items: center;
    background: linear-gradient(135deg, var(--preview-primary), var(--preview-accent));
    border-radius: 12px;
    color: #fff;
    display: flex;
    font-weight: 900;
    height: 54px;
    justify-content: center;
    width: 54px;
}

.brand-live-preview main {
    color: var(--preview-ink);
    display: grid;
    gap: 20px;
    align-content: start;
    padding: 24px;
}

.preview-top {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

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

.brand-live-preview section {
    background: var(--preview-panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 28px;
}

.preview-bars {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
}

.preview-bars span {
    background: linear-gradient(135deg, var(--preview-primary), var(--preview-accent));
    border-radius: 12px;
    height: 70px;
}

.branding-form {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.branding-form .wide {
    grid-column: 1 / -1;
}

.docs-page {
    background: var(--paper);
}

.api-docs {
    margin: 0 auto;
    max-width: 1180px;
    padding: 32px;
}

.endpoint-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
    grid-template-columns: 90px minmax(260px, .8fr) 1fr;
    padding: 12px 0;
}

.endpoint-row code {
    background: #eef4f0;
    border-radius: 8px;
    padding: 8px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
}

@media (max-width: 900px) {
    .hero,
    .feature-grid,
    .steps,
    .app-page,
    .module-grid,
    .stat-grid,
    .branding-board,
    .theme-gallery,
    .branding-form,
    .workspace-form,
    .workspace-form.compact,
    .export-grid,
    .token-form {
        grid-template-columns: 1fr;
    }

    .site-header {
        align-items: flex-start;
        gap: 14px;
    }

    .site-header,
    .site-header nav,
    .workspace-header,
    .app-topbar,
    .list-item {
        flex-direction: column;
    }

    .brand-live-preview {
        grid-template-columns: 1fr;
    }

    .sidebar {
        height: auto;
        position: static;
    }
}
