:root {
    --bg: #f4efe6;
    --surface: rgba(255, 250, 243, 0.82);
    --surface-strong: #fffaf3;
    --surface-dark: #10283c;
    --text: #1f2c33;
    --muted: #5f6f79;
    --line: rgba(16, 40, 60, 0.12);
    --accent: #cc6a3c;
    --accent-deep: #a54a22;
    --success: #1f8d69;
    --danger: #b14d43;
    --pending: #8e6a14;
    --shadow: 0 22px 60px rgba(23, 37, 45, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(204, 106, 60, 0.18), transparent 36%),
        radial-gradient(circle at top right, rgba(16, 40, 60, 0.1), transparent 28%),
        linear-gradient(180deg, #fbf5ec 0%, #f1ebe1 100%);
}

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

img {
    max-width: 100%;
}

code {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: rgba(16, 40, 60, 0.08);
    font-size: 0.92rem;
}

.shell {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
    background: rgba(251, 245, 236, 0.84);
    border-bottom: 1px solid rgba(16, 40, 60, 0.08);
}

.topbar__inner {
    width: min(1160px, calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
}

.brand__mark {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, #d99246 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.brand__text,
h1,
h2,
h3 {
    font-family: "Palatino Linotype", Georgia, serif;
}

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

.topnav > a {
    color: var(--muted);
    font-weight: 600;
}

.topnav > a.active,
.topnav > a:hover {
    color: var(--text);
}

.hero,
.content-grid,
.section-grid,
.stat-grid,
.card-grid,
.flow-steps,
.action-grid,
.mode-choice-grid {
    display: grid;
    gap: 1.4rem;
}

.hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 2rem 0 1rem;
}

.hero__copy h1 {
    margin: 0.25rem 0 1rem;
    font-size: clamp(2.3rem, 6vw, 4.6rem);
    line-height: 0.95;
}

.hero__lead {
    max-width: 60ch;
    font-size: 1.1rem;
    color: var(--muted);
}

.hero__actions,
.button-row,
.page-header__actions,
.hero__meta,
.tag-row {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero__actions {
    margin: 1.5rem 0 1rem;
}

.hero__meta span,
.tag-chip {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(16, 40, 60, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--accent-deep);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
}

.panel-card,
.feature-card,
.flow-step,
.auth-card,
.stat-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-card,
.auth-card,
.feature-card,
.flow-step {
    padding: 1.4rem;
}

.panel-card--accent {
    background: linear-gradient(160deg, #10283c 0%, #19384d 100%);
    color: #f8f1e6;
}

.panel-card__label {
    margin-top: 0;
    color: rgba(248, 241, 230, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.78rem;
}

.panel-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-card__header h2,
.feature-card h2,
.flow-step h3,
.auth-card h1,
.page-header h1 {
    margin: 0;
}

.model-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.95rem;
}

.model-list li {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.model-list span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: rgba(248, 241, 230, 0.75);
}

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

.feature-card p,
.flow-step p,
.empty-state,
.stack-item p,
.page-header p,
.meta-block p {
    color: var(--muted);
}

.flow-section {
    margin: 3rem 0;
}

.flow-section__intro {
    max-width: 50rem;
    margin-bottom: 1.25rem;
}

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

.flow-step span {
    display: inline-flex;
    width: 2.6rem;
    height: 2.6rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
    background: rgba(204, 106, 60, 0.15);
    color: var(--accent-deep);
    font-weight: 700;
}

.cta-strip {
    margin-top: 3rem;
    padding: 1.6rem;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(16, 40, 60, 0.95), rgba(204, 106, 60, 0.92));
    color: #fff8f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.35rem;
    background: linear-gradient(135deg, var(--accent) 0%, #df864b 100%);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
    box-shadow: 0 10px 24px rgba(204, 106, 60, 0.3);
}

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

.btn--ghost {
    background: rgba(16, 40, 60, 0.06);
    color: var(--text);
    box-shadow: none;
}

.btn--small {
    padding: 0.72rem 1.05rem;
}

.btn--block {
    width: 100%;
}

.flash {
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
}

.flash--success {
    background: rgba(31, 141, 105, 0.12);
    color: var(--success);
}

.flash--error {
    background: rgba(177, 77, 67, 0.12);
    color: var(--danger);
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 10rem);
}

.auth-card {
    width: min(100%, 33rem);
}

.auth-card--wide {
    width: min(100%, 48rem);
}

.auth-card__switch {
    margin-top: 1rem;
    color: var(--muted);
}

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

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

.form-grid__full,
.form-grid__submit {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 0.45rem;
}

label span {
    font-weight: 700;
    color: var(--text);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(204, 106, 60, 0.22);
    border-color: rgba(204, 106, 60, 0.5);
}

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

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

.stat-card {
    padding: 1.25rem;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

.stat-card strong {
    font-size: 2rem;
    line-height: 1;
}

.content-grid {
    grid-template-columns: 1.1fr 0.9fr;
    margin-bottom: 1.5rem;
}

.content-grid--wide {
    grid-template-columns: 1fr 1fr;
}

.content-grid--single-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

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

.action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.action-card,
.section-card {
    display: grid;
    gap: 0.8rem;
    padding: 1.2rem;
    border-radius: 22px;
    background: rgba(16, 40, 60, 0.04);
    border: 1px solid var(--line);
}

.action-card h2,
.section-card h3 {
    margin: 0;
}

.section-card + .section-card {
    margin-top: 0.2rem;
}

.panel-card--sticky {
    align-self: start;
    position: sticky;
    top: 6.2rem;
}

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

.stack-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(16, 40, 60, 0.04);
}

.stack-item--link:hover {
    background: rgba(16, 40, 60, 0.08);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
}

.badge--connected,
.badge--published,
.badge--completed,
.badge--synced_draft {
    background: rgba(31, 141, 105, 0.14);
    color: var(--success);
}

.badge--pending,
.badge--processing {
    background: rgba(142, 106, 20, 0.14);
    color: var(--pending);
}

.badge--draft {
    background: rgba(16, 40, 60, 0.09);
    color: var(--text);
}

.badge--publish_failed,
.badge--failed,
.badge--completed_with_errors {
    background: rgba(177, 77, 67, 0.14);
    color: var(--danger);
}

.meta-block {
    display: grid;
    gap: 0.45rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
}

.meta-block span {
    font-weight: 700;
}

.copy-btn {
    justify-self: start;
    border: 0;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(16, 40, 60, 0.08);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.publish-form {
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.publish-form select {
    min-width: 13rem;
}

.ordered-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.8rem;
    color: var(--muted);
}

.article-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    padding-bottom: 1rem;
}

.article-meta span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
}

.article-content {
    color: var(--text);
    line-height: 1.7;
}

.article-content h2,
.article-content h3 {
    margin-top: 1.6rem;
}

.article-content p,
.article-content li {
    color: #33454f;
}

.thumbnail-preview {
    width: min(100%, 24rem);
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(16, 40, 60, 0.05);
}

.thumbnail-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.field-hint {
    color: var(--muted);
    font-size: 0.9rem;
}

.action-row--end {
    justify-content: flex-end;
}

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

.mode-choice {
    display: block;
}

.mode-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-choice__card {
    display: grid;
    gap: 0.5rem;
    height: 100%;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.mode-choice__card strong {
    font-size: 1rem;
}

.mode-choice__card small {
    color: var(--muted);
    line-height: 1.5;
}

.mode-choice input:checked + .mode-choice__card {
    border-color: rgba(204, 106, 60, 0.6);
    background: rgba(204, 106, 60, 0.1);
    transform: translateY(-1px);
}

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

.mode-panel[hidden] {
    display: none;
}

.inline-details {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.inline-details summary {
    cursor: pointer;
    font-weight: 700;
}

.progress-strip {
    width: 100%;
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(16, 40, 60, 0.08);
}

.progress-strip__bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent) 0%, #df864b 100%);
}

.bulk-item {
    align-items: flex-start;
}

.bulk-item__meta {
    display: grid;
    gap: 0.7rem;
    justify-items: end;
}

.bulk-status-text {
    font-size: 1.4rem;
}

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

.website-card {
    display: grid;
    gap: 0.2rem;
}

@media (max-width: 960px) {
    .hero,
    .content-grid,
    .content-grid--wide,
    .content-grid--single-main,
    .section-grid,
    .flow-steps,
    .stat-grid,
    .card-grid,
    .action-grid,
    .mode-choice-grid,
    .article-meta {
        grid-template-columns: 1fr;
    }

    .page-header,
    .cta-strip,
    .topbar__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-card--sticky {
        position: static;
    }
}

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

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

    .hero__copy h1 {
        font-size: 2.4rem;
    }
}
