:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #202124;
    background: #f5f6f4;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #ffffff 0, #f5f6f4 320px),
        #f5f6f4;
}

a {
    color: #0b6b6b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid #e3e4de;
    background: rgba(255, 255, 255, 0.94);
}

.brand {
    display: grid;
    gap: 2px;
    font-size: 22px;
    font-weight: 700;
    color: #202124;
}

.brand small,
nav small,
.eyebrow span,
.section-heading p,
.section-heading a span,
.section-subtitle,
.page-title p,
.empty span {
    color: #7c8581;
    font-size: 12px;
    font-weight: 600;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

nav a {
    display: grid;
    gap: 2px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
}

.page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 48px;
    width: min(1180px, calc(100% - 40px));
    margin: 38px auto 72px;
}

.page.single {
    display: block;
    width: min(820px, calc(100% - 32px));
}

.home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    width: min(1180px, calc(100% - 40px));
    margin: 54px auto 0;
    padding-bottom: 34px;
    border-bottom: 1px solid #e3e4de;
}

.home-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 760;
}

.eyebrow {
    margin: 0 0 14px;
    color: #8a5a2b;
    font-size: 15px;
    font-weight: 800;
}

.eyebrow span {
    margin-left: 8px;
}

.hero-copy {
    max-width: 650px;
    margin: 18px 0 0;
    color: #5f6562;
    font-size: 18px;
    line-height: 1.7;
}

.hero-action {
    flex: 0 0 auto;
}

.home-page {
    align-items: start;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
}

.section-heading p {
    margin: 4px 0 0;
}

.section-heading a {
    display: grid;
    gap: 2px;
    justify-items: end;
    font-weight: 700;
    line-height: 1.2;
}

.post-list-item {
    padding: 22px 0;
    border-bottom: 1px solid #deded6;
}

.post-title {
    display: inline-block;
    margin-bottom: 8px;
    color: #202124;
    font-size: 24px;
    font-weight: 700;
}

.meta {
    display: flex;
    gap: 12px;
    color: #666;
    font-size: 14px;
}

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

.sidebar-section {
    padding: 20px;
    border: 1px solid #e3e4de;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.sidebar-section h2 {
    margin: 0;
    font-size: 20px;
}

.section-subtitle {
    margin: 4px 0 14px;
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-list a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #d7dad2;
    border-radius: 999px;
    background: #fff;
    color: #43504c;
    font-size: 14px;
}

.muted {
    margin: 0;
    color: #858b88;
    font-size: 14px;
}

.article h1 {
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.1;
}

.cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    margin: 24px 0;
}

.markdown {
    font-size: 17px;
    line-height: 1.8;
}

.archive {
    padding-left: 20px;
}

.archive li {
    margin: 10px 0;
}

.archive time {
    display: inline-block;
    min-width: 110px;
    color: #666;
}

.admin-login {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.admin-page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.two-col {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
}

.panel {
    padding: 22px;
    border: 1px solid #deded6;
    border-radius: 8px;
    background: #fff;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

label {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9c9c1;
    border-radius: 6px;
    font: inherit;
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #0b6b6b;
    border-radius: 6px;
    background: #0b6b6b;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.button.secondary {
    border-color: #c8d0ca;
    background: #fff;
    color: #0b6b6b;
}

.empty-state {
    margin-top: 22px;
    padding: 34px;
    border: 1px dashed #c8d0ca;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
}

.empty-title {
    margin: 0 0 8px;
    color: #202124;
    font-size: 24px;
    font-weight: 760;
}

.empty-state p:not(.empty-title) {
    margin: 0;
    color: #66706b;
    line-height: 1.7;
}

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

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

td,
th {
    padding: 10px;
    border-bottom: 1px solid #e8e8e2;
    text-align: left;
}

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

.actions form,
.admin-header form {
    margin: 0;
}

.inline-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.empty {
    color: #666;
}

.empty span {
    display: block;
    margin-top: 4px;
}

.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.08;
}

.page-title p {
    margin: 8px 0 0;
    font-size: 14px;
}

@media (max-width: 760px) {
    .site-header,
    .admin-header,
    .home-hero,
    .toolbar,
    .inline-form {
        align-items: flex-start;
        flex-direction: column;
    }

    nav {
        gap: 12px 18px;
    }

    .page,
    .two-col {
        display: block;
    }

    .sidebar {
        margin-top: 28px;
    }

    .home-hero {
        margin-top: 32px;
    }

    .empty-state {
        padding: 24px;
    }
}
