:root {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --surface-soft: #fbfaf7;
    --text: #18202a;
    --muted: #66707c;
    --border: #d9e1e8;
    --accent: #155d61;
    --accent-dark: #0f4f52;
    --shadow: 0 8px 20px rgba(16, 28, 44, 0.05);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(940px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 245, 240, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(217, 225, 232, 0.75);
}
.nav-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}
.brand-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand { font-weight: 800; font-size: 1.02rem; letter-spacing: 0.01em; }
.brand-tag { color: var(--muted); font-size: 0.76rem; }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 0.95rem; }
.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 9px 13px;
    color: var(--text);
}
.mobile-nav {
    display: none;
    padding: 0 0 12px;
}
.mobile-nav a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
}
main { display: block; }
.tool-shell { padding: 18px 0 26px; }
.tool-frame { max-width: 940px; }
.tool-intro {
    text-align: center;
    margin: 0 auto 18px;
}
.title-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.eyebrow {
    margin: 0;
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.82rem;
    cursor: help;
}
.tool-copy {
    margin: 10px auto 0;
    max-width: 56ch;
    color: var(--muted);
    font-size: 1rem;
}
.tool-form {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}
.editor-shell, .advanced-panel, .result-area {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.editor-shell {
    padding: 18px 18px 16px;
}
.editor-header, .meta-row, .action-row, .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.editor-header {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.95rem;
}
.text-action {
    border: none;
    background: transparent;
    color: var(--accent);
    padding: 0;
    cursor: pointer;
    font-weight: 700;
}
textarea, select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
}
textarea {
    min-height: 380px;
    resize: vertical;
    padding: 16px;
    line-height: 1.7;
    font-size: 1rem;
}
textarea::placeholder { color: #8a94a1; }
select {
    padding: 11px 12px;
    background-image: linear-gradient(45deg, transparent 50%, #83919d 50%), linear-gradient(135deg, #83919d 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    appearance: none;
}
select:focus, textarea:focus, button:focus, a:focus {
    outline: 3px solid rgba(21, 93, 97, 0.15);
    outline-offset: 2px;
}
.meta-row {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
}
.controls-block {
    display: grid;
    gap: 12px;
}
.compact-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.field {
    display: grid;
    gap: 6px;
}
.field span, .mini-label {
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}
.advanced-toggle-row {
    justify-content: flex-start;
}
.advanced-link {
    color: var(--accent);
    font-weight: 700;
    padding: 0;
}
.advanced-panel {
    padding: 14px 16px;
}
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.stack {
    display: grid;
    gap: 8px;
}
.stack h3 {
    margin: 0 0 2px;
    font-size: 0.92rem;
}
.stack label {
    color: var(--muted);
    font-size: 0.96rem;
}
.stack input {
    margin-right: 8px;
}
.action-row {
    gap: 12px;
    align-items: end;
    margin-top: 4px;
}
.status-group {
    min-height: 24px;
}
.demo-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.primary-btn {
    border: none;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 13px 18px;
    font-weight: 700;
    cursor: pointer;
}
.primary-btn:hover { background: var(--accent-dark); }
.tool-btn {
    min-width: 220px;
    justify-self: end;
}
.promise-line {
    margin-top: 12px;
    color: var(--text);
    font-size: 0.96rem;
    text-align: center;
}
.promise-sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}
.result-area {
    margin-top: 12px;
    padding: 18px;
}
.result-header {
    margin-bottom: 14px;
}
.result-header h2 {
    margin: 0;
    font-size: 1.08rem;
}
.result-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.result-box {
    min-height: 180px;
    white-space: pre-wrap;
    line-height: 1.75;
    font-size: 1.03rem;
}
.integrity-summary {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.integrity-summary summary {
    cursor: pointer;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 700;
}
.integrity-summary .warning {
    color: #8b5e00;
}
.integrity-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.94rem;
}
.quick-actions {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}
.quick-action {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 14px;
    padding: 11px 12px;
    text-align: left;
    color: var(--text);
}
.quick-action:hover { border-color: var(--accent); color: var(--accent); }
.comparison-section, .value-section, .steps-section, .about-section, .policy-section, .contact-section {
    margin-top: 28px;
}
.comparison-section h2, .value-section h2 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 1.12rem;
    font-weight: 800;
}
.comparison-section > p, .value-section > p {
    text-align: center;
    margin: 0 auto 14px;
    max-width: 60ch;
}
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.comparison-grid h3 {
    margin: 0 0 10px;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
}
.comparison-steps {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-size: 0.95rem;
}
.arrow {
    color: var(--muted);
    font-size: 0.9rem;
    padding-left: 16px;
}
.promise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.promise-grid > div {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    background: var(--surface);
}
.promise-grid h3 {
    margin: 0 0 8px;
    font-size: 0.98rem;
}
.subtle-grid {
    display: grid;
    gap: 12px;
}
.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    margin-top: 18px;
}
.footer-brand {
    font-weight: 800;
}
.footer-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.94rem;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 0 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}
.muted { color: var(--muted); }
.is-error { color: #9a1c1c; }
.simple-list {
    display: grid;
    gap: 10px;
    padding-left: 18px;
    color: var(--muted);
}
.mini-card-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mini-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
}
.mini-card h3 {
    margin: 0 0 6px;
    font-size: 0.98rem;
}
@media (max-width: 980px) {
    .compact-grid, .advanced-grid, .mini-card-row, .comparison-grid, .promise-grid {
        grid-template-columns: 1fr;
    }
    .site-nav {
        display: none;
    }
    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }
    .mobile-nav {
        display: grid;
    }
    .tool-btn {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
    }
}
@media (max-width: 640px) {
    .wrap {
        width: min(100% - 32px, 940px);
    }
    .tool-shell {
        padding-top: 18px;
    }
    .editor-shell, .advanced-panel, .result-area {
        padding: 14px;
    }
    textarea {
        min-height: 350px;
    }
    .action-row, .footer-row, .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
    .tool-btn {
        width: 100%;
    }
}
