:root {
    color-scheme:light;
    --ink:#202c3a;
    --muted:#697585;
    --line:#e1e7ec;
    --accent:#167765;
    --bg:#f6f8fa
}
* {
    box-sizing:border-box
}
body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
    font-size:14px;
    line-height:1.6
}
a {
    color:inherit;
    text-decoration:none
}
button,select,textarea {
    font:inherit
}
button,a,select {
    -webkit-tap-highlight-color:transparent
}
button {
    cursor:pointer
}
button:disabled {
    cursor:default;
    opacity:.45
}
button:focus-visible,a:focus-visible,select:focus-visible {
    outline:3px solid #78bcac;
    outline-offset:4px
}
[hidden] {
    display:none!important
}
.shell {
    max-width:1184px;
    padding:0 40px;
    margin:auto;
    min-height:100vh;
    display:flex;
    flex-direction:column
}
main {
    flex:1
}
.site-header {
    min-height:94px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    border-bottom:1px solid var(--line);
    gap:16px
}
.brand {
    display:flex;
    align-items:center;
    gap:12px;
    font-size:18px;
    font-weight:700;
    white-space:nowrap
}
.brand-mark {
    display:grid;
    place-items:center;
    background:var(--ink);
    color:white;
    border-radius:11px;
    width:38px;
    height:38px;
    font-size:24px
}
.brand-sub {
    font-size:10px;
    letter-spacing:2px;
    font-weight:500;
    color:var(--muted);
    margin-left:4px
}
.header-note {
    color:var(--muted);
    font-size:12px
}
.hero {
    padding:65px 0 47px
}
.eyebrow {
    color:var(--accent);
    font-size:12px;
    font-weight:600;
    letter-spacing:2px
}
h1 {
    font-size:38px;
    line-height:1.35;
    letter-spacing:-1px;
    margin:17px 0
}
h1 span {
    color:var(--accent)
}
.hero p,.workspace-heading p {
    color:var(--muted);
    font-size:15px;
    margin:0
}
.local-note {
    display:inline-flex;
    gap:8px;
    align-items:center;
    color:var(--muted);
    font-size:12px
}
.hero .local-note {
    margin-top:23px
}
.status-dot {
    width:6px;
    height:6px;
    border-radius:50%;
    background:var(--accent);
    flex-shrink:0
}
.section-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px;
    gap:12px
}
.section-heading h2 {
    font-size:17px;
    margin:0
}
.section-heading>span {
    font-size:12px;
    color:var(--muted)
}
.tool-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px
}
.tool-card {
    display:block;
    background:#fff;
    border:1px solid var(--line);
    border-radius:14px;
    padding:25px;
    transition:transform .18s,border-color .18s,box-shadow .18s
}
.tool-card:hover {
    transform:translateY(-3px);
    border-color:#8ab6ac;
    box-shadow:0 8px 22px #22334409
}
.card-top {
    display:flex;
    justify-content:space-between;
    align-items:center
}
.tool-icon {
    width:38px;
    height:38px;
    display:grid;
    place-items:center;
    background:#edf6f3;
    color:var(--accent);
    border-radius:10px;
    font-size:23px;
    font-weight:500
}
.category {
    color:var(--muted);
    font-size:11px
}
.tool-card h2 {
    font-size:19px;
    margin:20px 0 8px
}
.tool-card p {
    font-size:13px;
    color:var(--muted);
    margin:0 0 26px
}
.card-link {
    display:flex;
    justify-content:space-between;
    color:var(--accent);
    font-size:12px;
    font-weight:600
}
.site-footer {
    margin-top:65px;
    padding:25px 0;
    display:flex;
    justify-content:space-between;
    gap:12px;
    border-top:1px solid var(--line);
    color:var(--muted);
    font-size:11px
}
.site-footer a:hover {
    text-decoration:underline
}
.tool-nav {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    padding:25px 0;
    border-bottom:1px solid var(--line)
}
.tool-nav a {
    padding:7px 17px;
    border-radius:7px;
    color:var(--muted);
    font-size:13px
}
.tool-nav a:hover {
    background:#eaf0ef
}
.tool-nav a[aria-current="page"] {
    background:#e1efe9;
    color:#166451;
    font-weight:600
}
.workspace-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:36px 0 28px
}
.workspace-heading h1 {
    font-size:32px;
    margin:10px 0
}
.workspace {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    border:1px solid var(--line);
    border-radius:14px;
    overflow:hidden;
    background:#fff
}
.editor-panel {
    min-width:0
}
.editor-panel+.editor-panel {
    border-left:1px solid var(--line)
}
.panel-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:17px 20px;
    border-bottom:1px solid #eef1f4;
    min-height:64px
}
.panel-heading label {
    font-weight:600
}
.text-actions {
    display:flex;
    gap:16px
}
.text-actions button,.copy-button {
    border:0;
    padding:4px 0;
    background:transparent;
    color:var(--accent);
    font-size:12px
}
.text-actions button:hover,.copy-button:hover {
    text-decoration:underline
}
textarea {
    display:block;
    width:100%;
    min-height:275px;
    resize:vertical;
    border:0;
    background:transparent;
    color:var(--ink);
    padding:22px;
    line-height:1.8;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:14px;
    border-radius:0;
    overflow-wrap:anywhere
}
textarea:focus {
    outline:2px solid #86b8ac;
    outline-offset:-3px
}
textarea::placeholder {
    color:#929ca6
}
.result-panel {
    background:#fbfcfd
}
.panel-bottom {
    padding:12px 20px;
    display:flex;
    justify-content:space-between;
    color:var(--muted);
    font-size:11px;
    border-top:1px solid #eef1f4
}
.action-bar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-top:22px
}
.action-buttons {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px
}
.button {
    border:1px solid transparent;
    border-radius:8px;
    padding:11px 25px;
    font-weight:600;
    font-size:13px
}
.primary {
    color:#fff;
    background:var(--accent)
}
.primary:hover {
    background:#105e4f
}
.secondary {
    background:#fff;
    border-color:var(--line);
    color:var(--ink)
}
select {
    max-width:100%;
    padding:10px;
    border:1px solid var(--line);
    border-radius:8px;
    background:white;
    color:var(--ink)
}
.shortcut {
    font-size:11px;
    color:var(--muted)
}
.feedback {
    min-height:23px;
    margin:12px 0;
    color:var(--accent);
    font-size:12px
}
.feedback.error {
    color:#b33636
}
.help-box {
    display:flex;
    gap:13px;
    padding:20px 23px;
    background:#eef2f5;
    border-radius:10px
}
.help-icon {
    width:19px;
    height:19px;
    border:1px solid #8a96a2;
    border-radius:50%;
    display:grid;
    place-items:center;
    font-size:12px;
    color:var(--muted);
    flex-shrink:0;
    margin-top:3px
}
.help-box h2 {
    font-size:13px;
    margin:0 0 5px
}
.help-box p {
    font-size:12px;
    color:var(--muted);
    margin:0;
    line-height:1.9
}
@media(min-width:1500px) {
    .hero {
        padding-top:80px
    }

}
@media(max-width:900px) {
    .shell {
        padding:0 26px
    }
    .tool-grid {
        grid-template-columns:repeat(2,minmax(0,1fr))
    }
    .brand-sub {
        display:none
    }
    .shortcut {
        display:none
    }

}
@media(max-width:600px) {
    .shell {
        padding:0 18px
    }
    .site-header {
        min-height:76px
    }
    .header-note {
        font-size:10px
    }
    .brand {
        font-size:16px;
        gap:8px
    }
    .brand-mark {
        width:32px;
        height:32px;
        font-size:21px
    }
    .hero {
        padding:39px 0 32px
    }
    h1 {
        font-size:30px
    }
    .hero h1 span {
        display:block;
        margin-top:6px
    }
    .hero p {
        font-size:13px;
        max-width:290px
    }
    .tool-grid {
        grid-template-columns:1fr;
        gap:12px
    }
    .tool-card {
        padding:21px
    }
    .tool-card h2 {
        margin-top:15px
    }
    .tool-card p {
        margin-bottom:17px
    }
    .section-heading>span {
        font-size:10px
    }
    .tool-nav {
        gap:4px;
        padding:18px 0
    }
    .tool-nav a {
        padding:7px 11px;
        font-size:12px
    }
    .workspace-heading {
        padding:26px 0 22px;
        align-items:flex-start;
        flex-direction:column;
        gap:12px
    }
    .workspace-heading h1 {
        font-size:27px
    }
    .workspace-heading p {
        font-size:13px
    }
    .workspace {
        grid-template-columns:1fr
    }
    .editor-panel+.editor-panel {
        border-left:0;
        border-top:1px solid var(--line)
    }
    textarea {
        min-height:190px;
        padding:17px;
        font-size:16px
    }
    .panel-heading {
        padding:13px 16px;
        min-height:55px
    }
    .panel-bottom {
        padding:10px 16px
    }
    .action-bar,.action-buttons {
        width:100%
    }
    .action-buttons .button {
        flex:1;
        padding:12px 17px
    }
    .action-buttons label {
        flex-basis:100%
    }
    .action-buttons select {
        width:100%
    }
    .site-footer {
        margin-top:40px;
        flex-direction:column;
        align-items:center;
        text-align:center
    }
    .help-box {
        padding:17px
    }

}
@media(prefers-reduced-motion:reduce) {
    .tool-card {
        transition:none
    }
    .tool-card:hover {
        transform:none
    }

}

.diff-report { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.diff-report h2 { margin: 0; font-size: 14px; }
#diff-summary { font-size: 12px; color: var(--muted); }
#diff-lines { margin: 0; padding: 14px 0; max-height: 500px; overflow: auto; font: 13px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.diff-line { display: block; min-width: max-content; padding: 0 14px; white-space: pre; }
.diff-add { background: #e4f5ea; color: #1a6136; }
.diff-remove { background: #ffedeb; color: #9c3530; }
