.tree-page {
    max-width: 1320px;
    margin: 0 auto;
}

.tree-hero {
    padding: 18px 0 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}

.tree-eyebrow {
    margin: 0 0 6px;
    color: #28776d;
    font-size: 13px;
    font-weight: 700;
}

.tree-hero h1 {
    max-width: 900px;
    margin: 0;
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1.3;
}

.tree-lead {
    max-width: 900px;
    margin: 9px 0 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.75;
}

.tree-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    color: #42545a;
    font-size: 13px;
    font-weight: 600;
}

.tree-benefits span::before {
    content: "✓";
    margin-right: 6px;
    color: #28776d;
}

.tree-tool-row {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 26px;
    align-items: start;
    padding: 18px 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.tree-input-panel,
.tree-output-panel {
    min-width: 0;
}

.tree-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tree-panel-heading h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.4;
}

.tree-panel-heading p {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.tree-step-label {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid #c6dfd8;
    border-radius: 50%;
    color: #28776d;
    font-size: 12px;
    font-weight: 700;
}

.tree-input-help,
.tree-example-note,
.tree-preview-caption {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

.tree-input-help {
    margin: -3px 0 9px;
}

.tree-textarea {
    display: block;
    width: 100%;
    min-height: 316px;
    resize: vertical;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fbfdfc;
    color: var(--text-primary);
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-size: 14px;
    line-height: 1.85;
    tab-size: 2;
}

.tree-textarea:focus {
    border-color: #28776d;
    outline: 3px solid rgba(40, 119, 109, 0.15);
}

.tree-example-note {
    margin: 7px 0 0;
}

.tree-actions,
.tree-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.tree-actions button,
.tree-download-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
}

.tree-error,
.tree-status {
    margin: 10px 0 0;
    padding: 9px 11px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.6;
}

.tree-error {
    border: 1px solid #edb4aa;
    background: #fff3ef;
    color: #8e3427;
}

.tree-error:not([hidden]) {
    display: block;
}

.tree-status {
    color: #28776d;
}

.tree-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 12px;
}

.tree-summary > div {
    min-width: 0;
    min-height: 66px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #f8fbfa;
}

.tree-summary span {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
}

.tree-summary strong {
    display: block;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.tree-preview-scroll {
    min-width: 0;
    max-height: 480px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    scrollbar-color: #a7bbb6 #f2f6f5;
}

.tree-preview {
    display: block;
    width: 100%;
    min-width: 520px;
    height: auto;
}

.tree-preview-caption {
    margin: 8px 0 0;
}

.tree-download-actions {
    margin-top: 12px;
}

.tree-content {
    max-width: 980px;
    margin: 0 auto;
}

.tree-content-section {
    padding: 26px 0;
    border-bottom: 1px solid var(--border-color);
}

.tree-content-section h2,
.tree-related h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 21px;
    line-height: 1.45;
}

.tree-content-section h3 {
    margin: 0 0 6px;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

.tree-content-section p,
.tree-content-section li {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.9;
}

.tree-content-section p {
    margin: 0 0 13px;
}

.tree-content-section p:last-child {
    margin-bottom: 0;
}

.tree-content-section ul {
    margin: 10px 0 0;
    padding-left: 1.35rem;
}

.tree-example-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
    margin-top: 16px;
}

.tree-example-list > div {
    padding-top: 12px;
    border-top: 2px solid #d8e8e3;
}

.tree-example-list p {
    margin: 0;
    font-size: 14px;
}

.tree-table-wrap {
    overflow-x: auto;
    margin-top: 14px;
}

.tree-table-wrap table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.tree-table-wrap th,
.tree-table-wrap td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.tree-table-wrap thead th,
.tree-table-wrap tbody th {
    color: var(--text-primary);
    font-weight: 700;
}

.tree-faq-list details {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.tree-faq-list summary {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tree-faq-list details p {
    margin: 9px 0 0;
}

.tree-related {
    padding: 26px 0 38px;
}

.tree-related-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
}

.tree-related-links a {
    display: grid;
    gap: 4px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
}

.tree-related-links a:hover strong {
    color: #28776d;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tree-related-links span {
    color: var(--text-secondary);
    font-size: 13px;
}

@media (max-width: 900px) {
    .tree-tool-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tree-textarea {
        min-height: 230px;
    }
}

@media (max-width: 600px) {
    .tree-hero {
        padding-top: 8px;
    }

    .tree-hero h1 {
        font-size: 23px;
    }

    .tree-benefits {
        gap: 7px 12px;
    }

    .tree-summary {
        gap: 6px;
    }

    .tree-summary > div {
        padding: 9px 8px;
    }

    .tree-summary strong {
        font-size: 16px;
    }

    .tree-example-list,
    .tree-related-links {
        grid-template-columns: 1fr;
    }

    .tree-content-section {
        padding: 22px 0;
    }
}
