:root {
    --bg: #f3f5f7;
    --surface: #ffffff;
    --surface-muted: #eef2f5;
    --text: #102132;
    --text-soft: #4d6377;
    --primary: #0a7c67;
    --primary-strong: #065d4e;
    --border: #d5dde5;
    --danger: #b42318;
    --radius: 14px;
    --shadow: 0 12px 30px rgba(5, 25, 42, 0.08);
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f6faf9 0%, var(--bg) 35%, #f0f2f5 100%);
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1160px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.68rem;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #b7d9d1;
    background: linear-gradient(145deg, #0a7c67, #1b8b76 45%, #2b9aa2);
    box-shadow: 0 8px 18px rgba(7, 94, 77, 0.22);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.logo-mark svg {
    width: 28px;
    height: 28px;
}

.logo-mark .sheet {
    fill: #ffffff;
    opacity: 0.96;
}

.logo-mark .line {
    stroke: #2b9a88;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.logo-mark .pencil {
    fill: #f4bc4b;
}

.logo-mark .tip {
    fill: #db8f35;
}

.logo-label {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-title {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--text);
}

.logo-sub {
    margin-top: 0.19rem;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #156899;
}

.menu-toggle {
    display: none;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.main-nav a {
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    color: var(--text-soft);
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--surface-muted);
    color: var(--text);
    text-decoration: none;
}

.hero {
    padding: 4.2rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    gap: 1.25rem;
    align-items: stretch;
}

.eyebrow {
    display: inline-block;
    margin: 0;
    padding: 0.3rem 0.65rem;
    background: #d9f3ea;
    color: #055c4d;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    margin: 0.8rem 0 0.8rem;
    font-size: clamp(1.95rem, 3.8vw, 3rem);
}

.lead {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 64ch;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.hero-points span {
    font-size: 0.85rem;
    font-weight: 700;
    background: #e7f0f8;
    color: #174f83;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.hero-card ul {
    margin: 0.6rem 0 0;
    padding-left: 1rem;
}

.hero-card li {
    margin-bottom: 0.55rem;
    color: var(--text-soft);
}

.tools-section {
    padding: 1rem 0 3rem;
}

.section-heading {
    margin-bottom: 1.25rem;
}

.section-heading p {
    margin: 0;
    color: var(--text-soft);
}

.tool-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    align-items: start;
}

.tool-sidebar,
.tool-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tool-sidebar {
    padding: 1rem;
    position: sticky;
    top: 86px;
}

.tool-sidebar label {
    display: block;
    font-size: 0.84rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
    color: var(--text-soft);
}

.tool-sidebar input,
.tool-sidebar select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 42px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.85rem;
    font-size: 0.93rem;
}

.feature-list {
    display: grid;
    gap: 0.5rem;
    max-height: 70vh;
    overflow: auto;
    padding-right: 0.2rem;
}

.feature-item {
    text-align: left;
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.65rem;
    cursor: pointer;
    display: grid;
    gap: 0.24rem;
}

.feature-item strong {
    font-size: 0.92rem;
}

.feature-item span {
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.25;
}

.feature-item:hover {
    border-color: #9ab7d3;
}

.feature-item.active {
    border-color: #62a5d8;
    background: #e8f2fc;
}

.empty-list {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.tool-main {
    padding: 1.15rem;
    display: grid;
    gap: 1rem;
}

.feature-meta h3 {
    margin: 0.35rem 0;
}

.feature-category {
    display: inline-block;
    margin: 0;
    font-weight: 700;
    color: #0d5e9c;
    background: #e6f2fc;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.feature-meta p {
    margin: 0;
    color: var(--text-soft);
}

.params-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafcfe;
}

.param-field {
    display: grid;
    gap: 0.32rem;
    font-size: 0.83rem;
    color: var(--text-soft);
    font-weight: 700;
}

.param-field input,
.param-field select,
.contact-form input,
.contact-form textarea,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 0.6rem 0.7rem;
    font-size: 0.95rem;
}

.param-field.checkbox {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-top: 1.4rem;
}

.param-field.checkbox input {
    width: auto;
    transform: scale(1.15);
}

.no-params {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--text-soft);
}

.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.editor-header h4 {
    margin: 0;
}

textarea {
    font-family: var(--mono);
    line-height: 1.5;
    resize: vertical;
    min-height: 250px;
}

textarea[readonly] {
    background: #f8fafc;
}

button {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 0.55rem 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    border-color: #aabcca;
    background: #f5f9fc;
}

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

button.primary:hover {
    border-color: var(--primary-strong);
    background: var(--primary-strong);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.status {
    margin: 0;
    font-size: 0.9rem;
    color: #135f00;
    min-height: 1.2em;
}

.status.error {
    color: var(--danger);
}

.content-section {
    padding: 1.2rem 0 2.8rem;
}

.split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.split-content article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.split-content ul {
    margin: 0.35rem 0 0.75rem;
    padding-left: 1.1rem;
}

.split-content li,
.prose p,
.prose li {
    color: var(--text-soft);
}

.page-section {
    padding: 2rem 0 3rem;
}

.prose {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.5rem;
}

.prose h2 {
    margin-top: 1.35rem;
}

.message {
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-weight: 700;
}

.message.success {
    background: #e9f8ef;
    color: #126d2b;
}

.message.error {
    background: #fcebea;
    color: #a01716;
}

.contact-form {
    display: grid;
    gap: 0.6rem;
    margin-top: 1rem;
}

.contact-form label {
    font-weight: 700;
    color: var(--text-soft);
}

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.article-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1rem;
    overflow: hidden;
}

.article-thumb-link {
    display: block;
    margin: -1rem -1rem 0.8rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    min-height: 160px;
    max-height: 230px;
}

.article-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid var(--border);
}

.article-card h2 {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
}

.article-card p {
    color: var(--text-soft);
}

.meta {
    margin: 0;
    font-size: 0.82rem;
    color: #617586;
}

.read-more {
    display: inline-block;
    margin-top: 0.6rem;
    font-weight: 700;
}

.article-prose p {
    line-height: 1.75;
}

.article-hero {
    margin: 0.85rem 0 1.1rem;
    width: min(100%, 860px);
}

.article-hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: clamp(240px, 36vw, 420px);
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
}

.site-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    background: #f5f8fb;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 1.2rem;
}

.site-footer h3 {
    margin-top: 0;
}

.site-footer p,
.site-footer li,
.site-footer small {
    color: #53687a;
}

.site-footer ul {
    margin: 0;
    padding-left: 1rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 1.2rem;
    padding: 1rem 0 1.2rem;
}

@media (max-width: 1080px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-sidebar {
        position: static;
    }

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

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

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

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-bottom: 0.75rem;
    }

    .main-nav.open {
        display: flex;
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 0.55rem 0;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
    }

    .logo-title {
        font-size: 1rem;
    }

    .logo-sub {
        letter-spacing: 0.14em;
        font-size: 0.6rem;
    }

    .hero-grid,
    .editor-grid,
    .split-content,
    .footer-grid,
    .articles-grid,
    .params-grid {
        grid-template-columns: 1fr;
    }

    textarea {
        min-height: 220px;
    }

    .article-thumb-link {
        min-height: 150px;
        max-height: 210px;
    }

    .article-hero-image {
        max-height: 300px;
    }
}
