:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --text: #17202a;
    --muted: #667085;
    --line: #d8dee8;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --blue: #2563eb;
    --warning: #f59e0b;
    --shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

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

button,
.button-link {
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    font-weight: 700;
    min-height: 42px;
    padding: 0 16px;
}

button:hover,
.button-link:hover {
    background: var(--accent-dark);
}

button.secondary {
    background: #eef2f7;
    color: #243447;
}

button.secondary:hover {
    background: #e1e7ef;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 220px;
}

.brand-mark {
    align-items: center;
    background: var(--accent);
    border-radius: 7px;
    color: white;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.nav a {
    border-radius: 6px;
    color: #344054;
    font-size: 14px;
    padding: 8px 10px;
}

.nav a:hover {
    background: #eef2f7;
}

.layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 320px;
    margin: 0 auto;
    max-width: 1280px;
    padding: 28px;
}

.tool-shell,
.content-page article,
.ad-slot,
.donation-card,
.tool-list {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.top-ad {
    grid-column: 1 / -1;
}

.tool-shell {
    min-width: 0;
    padding: 22px;
}

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

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

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

h1 {
    font-size: 32px;
    line-height: 1.15;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
}

.intro p:not(.eyebrow),
.content-page p {
    color: var(--muted);
    max-width: 760px;
}

.actions,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.pane {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.pane span {
    color: #344054;
    font-size: 14px;
    font-weight: 800;
}

textarea,
input {
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
    font: 14px/1.5 Consolas, Monaco, 'Courier New', monospace;
    outline: none;
    width: 100%;
}

textarea {
    min-height: 420px;
    padding: 14px;
    resize: vertical;
}

input {
    min-height: 42px;
    padding: 9px 12px;
}

textarea:focus,
input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.toolbar {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.status {
    color: var(--muted);
    font-size: 14px;
    margin: 12px 0 0;
}

.status.error {
    color: #b42318;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ad-slot {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.07), rgba(37, 99, 235, 0.07)),
        var(--panel);
    border: 2px dashed #7aa9a3;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 250px;
    padding: 20px;
    text-align: center;
}

.ad-slot.ad-wide {
    min-height: 96px;
}

.ad-slot.compact {
    box-shadow: none;
    margin-top: 18px;
}

.ad-slot span {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
    padding: 3px 10px;
    text-transform: uppercase;
}

.ad-slot strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1.2;
}

.ad-slot small {
    display: block;
    margin-top: 4px;
}

.donation-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.donation-card span,
.donation-card small {
    color: var(--muted);
    display: block;
}

.donation-card span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.donation-card strong {
    display: block;
    font-size: 18px;
    margin: 2px 0 4px;
}

.donation-card img {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    max-height: 260px;
    object-fit: contain;
    width: 100%;
}

.tool-list {
    padding: 18px;
}

.tool-list a {
    border: 1px solid transparent;
    border-radius: 7px;
    display: block;
    padding: 12px;
}

.tool-list a + a {
    margin-top: 6px;
}

.tool-list a:hover,
.tool-list a.active {
    background: #eef8f6;
    border-color: #b7ded8;
}

.tool-list strong,
.tool-list span {
    display: block;
}

.tool-list span {
    color: var(--muted);
    font-size: 13px;
}

.content-page {
    margin: 0 auto;
    max-width: 980px;
    padding: 36px 28px;
}

.content-page article {
    padding: 28px;
}

.content-page .ad-slot {
    margin-top: 20px;
    min-height: 120px;
}

.contact-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.contact-form label {
    color: #344054;
    display: grid;
    font-weight: 700;
    gap: 7px;
}

.contact-form textarea {
    min-height: 140px;
}

.footer {
    align-items: flex-start;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 20px;
    padding: 24px 28px 34px;
}

.footer p {
    margin: 4px 0 0;
}

.footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: flex-end;
}

.cookie-banner {
    align-items: center;
    background: #17202a;
    border-radius: 8px;
    bottom: 18px;
    box-shadow: var(--shadow);
    color: white;
    display: flex;
    gap: 16px;
    max-width: 460px;
    padding: 14px;
    position: fixed;
    right: 18px;
    width: calc(100% - 36px);
    z-index: 20;
}

.cookie-banner[hidden] {
    display: none;
}

.support-warning {
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    bottom: 18px;
    box-shadow: var(--shadow);
    color: #7c2d12;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    left: 18px;
    max-width: 520px;
    padding: 14px;
    position: fixed;
    width: calc(100% - 36px);
    z-index: 21;
}

.support-warning[hidden] {
    display: none;
}

.support-warning strong,
.support-warning p {
    margin: 0;
}

.support-warning p {
    color: #9a3412;
}

.support-warning button {
    background: #9a3412;
    min-width: 96px;
}

.cookie-banner p {
    margin: 0;
}

.cookie-banner button {
    background: #ffffff;
    color: #17202a;
    min-width: 96px;
}

@media (max-width: 960px) {
    .topbar,
    .intro,
    .footer,
    .cookie-banner,
    .support-warning {
        align-items: stretch;
        flex-direction: column;
    }

    .layout,
    .workspace {
        grid-template-columns: 1fr;
    }

    .layout,
    .content-page {
        padding: 18px;
    }

    .topbar {
        padding: 14px 18px;
    }

    .brand {
        min-width: 0;
    }

    .nav {
        justify-content: flex-start;
    }

    h1 {
        font-size: 26px;
    }

    textarea {
        min-height: 280px;
    }
}
