* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background: #f4f0e8;
    color: #17211b;
    line-height: 1.5;
}

.header {
    background: #173b35;
    color: #f9f5eb;
}

.header-content {
    max-width: 1100px;
    margin: auto;
    padding: 16px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #f9f5eb;
    text-decoration: none;
    font-size: 21px;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #c9d7cb;
    text-decoration: none;
}

nav a:hover {
    color: #f4c86e;
}


.container {
    max-width: 1000px;
    margin: auto;
    padding: 50px 20px;
}


.hero {
    text-align: center;
    margin: 25px auto 50px;
    max-width: 700px;
}

.hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(2.25rem, 6vw, 4.5rem);
    line-height: 1.02;
    letter-spacing: -1px;
}

.hero p {
    color: #53635b;
    font-size: 18px;
}

.eyebrow { color: #ad611d !important; font-family: Arial, sans-serif; font-size: 12px !important; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; }
.tool-directory { background: #fffdf8; border: 1px solid #ddd5c6; padding: 28px; }
.directory-heading { align-items: end; display: flex; justify-content: space-between; gap: 20px; }
.directory-heading h2 { margin: 0; font-size: 30px; }
.privacy-note { color: #68736a; font-family: Arial, sans-serif; font-size: 13px; }
.tool-search { margin-top: 24px; max-width: 620px; }
.tool-search label { display: block; font-family: Arial, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.tool-search input { background: #fff; font-size: 16px; margin: 0; }
.tool-search .privacy-note { margin: 7px 0 0; }
.tool-card.is-hidden { display: none; }
.tool-group.is-hidden { display: none; }
.search-empty { color: #ad611d; font-family: Arial, sans-serif; font-size: 14px; margin: 24px 0 0; }
.tool-group { border-top: 1px solid #e4ded2; margin-top: 25px; padding-top: 22px; }
.tool-group h3 { font-size: 14px; margin: 0 0 14px; color: #ad611d; font-family: Arial, sans-serif; text-transform: uppercase; letter-spacing: .6px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tool-card { background: #f7f4ed; border: 1px solid #e4ded2; color: #17211b; display: flex; flex-direction: column; gap: 5px; padding: 16px; text-decoration: none; transition: border-color .2s, transform .2s; }
.tool-card:hover { border-color: #ad611d; transform: translateY(-2px); }
.tool-card strong { font-family: Arial, sans-serif; font-size: 15px; }
.tool-card span { color: #68736a; font-size: 14px; }
.tool-card.featured { border-left: 4px solid #d88a34; }
.ai-tools { background: #fbf7ed; margin: -1px -1px 0; padding: 22px; }
.ai-tools .tool-card { background: #fffdf8; }


.tool {
    background: #fffdf8;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #ddd5c6;
}


.editor-header,
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;
}

.editor-header label,
.output-header h2 {
    font-weight: bold;
}

.output-header h2 {
    margin: 0;
}


textarea {
    width: 100%;
    min-height: 300px;

    resize: vertical;

    padding: 15px;

    border: 1px solid #cfc7b8;
    border-radius: 7px;

    font-family: "Courier New", monospace;
    font-size: 14px;

    outline: none;
}

textarea:focus {
    border-color: #ad611d;
}

input:not([type="checkbox"]),
select {
    border: 1px solid #cfc7b8;
    border-radius: 7px;
    font: inherit;
    margin: 8px 0 16px;
    padding: 11px 12px;
    width: 100%;
}

input:focus { border-color: #ad611d; outline: none; }
.flag-row { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 18px; }
.flag-row label { font-family: Arial, sans-serif; font-size: 13px; }
.flag-row input { width: auto; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.form-grid label { font-family: Arial, sans-serif; font-size: 13px; }
.form-grid .actions, .form-grid pre { grid-column: 1 / -1; }
.stats { display: flex; gap: 12px; margin-top: 18px; }
.stats strong { background: #f4f0e8; border: 1px solid #ddd5c6; display: flex; flex-direction: column; padding: 14px 18px; }
.stats output { font-size: 24px; }
.stats span { color: #68736a; font: 12px Arial, sans-serif; }
mark { background: #f4c86e; color: #17211b; }
.url-parts p { border-bottom: 1px solid #e4ded2; display: flex; gap: 20px; justify-content: space-between; padding: 10px 0; white-space: pre-wrap; }
.url-parts strong { font-family: Arial, sans-serif; }
.chunk-list { display: grid; gap: 12px; margin-top: 22px; }
.chunk-list article { border: 1px solid #ddd5c6; padding: 14px; }
.chunk-list article strong { font-family: Arial, sans-serif; font-size: 13px; }
.chunk-list pre { margin: 8px 0 0; min-height: 0; }


.actions {
    display: flex;
    gap: 10px;

    margin: 20px 0;

    flex-wrap: wrap;
}


button {
    border: none;
    border-radius: 6px;

    padding: 10px 16px;

    cursor: pointer;

    font-size: 14px;
}


.primary-btn {
    background: #ad611d;
    color: white;
}

.primary-btn:hover {
    background: #874a17;
}


.secondary-btn {
    background: #e7e0d3;
    color: #17211b;
}

.secondary-btn:hover {
    background: #d9cfbe;
}


.status {
    padding: 12px 15px;
    border-radius: 6px;

    margin-bottom: 20px;

    font-size: 14px;
}

.status.success {
    background: #dcfce7;
    color: #166534;
}

.status.error {
    background: #fee2e2;
    color: #991b1b;
}

.hidden {
    display: none;
}


.output-section {
    margin-top: 25px;
}


pre {
    background: #173b35;
    color: #edf3e8;

    padding: 20px;

    border-radius: 7px;

    min-height: 200px;

    overflow-x: auto;

    white-space: pre-wrap;
    word-break: break-word;

    font-family: monospace;
    font-size: 14px;
}


.content {
    margin-top: 45px;
}

.content h2 {
    margin-top: 35px;
}

.content p {
    color: #53635b;
    line-height: 1.7;
}


.footer {
    text-align: center;

    padding: 30px;

    color: #6b7280;

    font-size: 14px;
}


@media (max-width: 600px) {

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 28px;
    }

    .tool {
        padding: 15px;
    }

    .tool-directory { padding: 18px; }
    .directory-heading { align-items: start; flex-direction: column; gap: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .stats { flex-wrap: wrap; }
}