﻿:root {
    --bg: #f4efe6;
    --paper: #fffdf8;
    --ink: #1f2937;
    --subtle: #6b7280;
    --line: #ddd6c7;
    --accent: #0f766e;
    --accent-soft: rgba(15, 118, 110, 0.12);
    --shadow: 0 18px 40px rgba(58, 42, 14, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 28%),
        linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

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

code,
pre {
    font-family: Consolas, "Courier New", monospace;
}

.shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px 48px;
}

.hero,
.page-header,
.panel,
.article-shell,
.nav-card {
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(221, 214, 199, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero,
.page-header {
    padding: 28px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 12px;
}

h1,
h2 {
    margin: 0;
}

.hero-text,
.subtle,
.summary,
.status-text,
.helper-text {
    color: var(--subtle);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.nav-card {
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.45);
}

.nav-card p {
    margin-bottom: 0;
}

.page-header,
.preview-top,
.button-row,
.article-meta,
.header-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel {
    padding: 20px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(320px, 1.05fr);
    gap: 20px;
}

.field {
    display: block;
    margin-bottom: 16px;
}

.field > span {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.field input,
.field textarea,
.field-output {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.field textarea {
    min-height: 360px;
    resize: vertical;
    line-height: 1.6;
}

.field-output {
    min-height: 360px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.helper-text {
    margin: -4px 0 16px;
    font-size: 13px;
}

.btn,
.text-link {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: #fff;
    color: var(--ink);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
}

.text-link {
    display: inline-flex;
}

.preview-panel,
.form-panel {
    min-width: 0;
}

.badge {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.cherry-host {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.cherry-host .cherry-toolbar {
    border-bottom: 1px solid var(--line);
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.tool-btn {
    border: 1px solid rgba(15, 118, 110, 0.2);
    background: #fff;
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}

.rich-editor {
    min-height: 420px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    line-height: 1.7;
    outline: none;
}

.rich-editor:focus {
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08);
}

.preview-surface {
    min-height: 420px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.article-shell {
    padding: 28px;
}

.article-shell h1 {
    margin: 16px 0 20px;
    font-size: 38px;
}

.article-body {
    line-height: 1.8;
    word-break: break-word;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
    margin: 1em 0;
}

.article-body pre {
    overflow: auto;
    padding: 16px;
    border-radius: 16px;
    background: #172026;
    color: #eff6ff;
}

.article-body code {
    background: rgba(15, 118, 110, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
}

.article-body pre code {
    background: transparent;
    padding: 0;
}

.article-body blockquote {
    padding: 4px 16px;
    border-left: 4px solid var(--accent);
    background: rgba(15, 118, 110, 0.05);
    border-radius: 0 12px 12px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    padding: 10px 12px;
    border: 1px solid var(--line);
}

@media (max-width: 960px) {
    .two-column {
        grid-template-columns: 1fr;
    }

    .page-header,
    .preview-top,
    .button-row,
    .article-meta,
    .header-links {
        flex-wrap: wrap;
    }

    .article-shell h1 {
        font-size: 30px;
    }
}
