:root{
    --bg:#080d1d;
    --card:#121b30;
    --panel:#080e1d;
    --border:#2b3854;
    --text:#eef3ff;
    --muted:#9eabc2;
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
    margin:0;
    min-height:100vh;
    background:var(--bg);
    color:var(--text);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

body::before{
    content:"";
    display:block;
    height:9px;
    background:#dbe8ff;
}

button,textarea,.editor{font:inherit}

.app{
    width:min(1180px,92vw);
    margin:0 auto;
    padding:28px 0 30px;
}

.hero{
    margin-bottom:18px;
}

.back-link{
    display:inline-block;
    margin-bottom:24px;
    color:#a9c7ff;
    text-decoration:none;
    font-size:.78rem;
    font-weight:800;
    letter-spacing:.06em;
}

.eyebrow{
    margin:0;
    color:#6fa8ff;
    font-size:.74rem;
    font-weight:900;
    letter-spacing:.15em;
}

.card{
    background:var(--card);
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:0 18px 50px rgba(0,0,0,.16);
}

.workspace{
    padding:0;
    overflow:hidden;
}

.toolbar{
    position:sticky;
    top:0;
    z-index:20;
    display:flex;
    justify-content:flex-end;
    padding:14px 18px;
    background:rgba(18,27,48,.97);
    border-bottom:1px solid var(--border);
    backdrop-filter:blur(12px);
}

.actions{
    display:flex;
    align-items:center;
    gap:9px;
}

.btn{
    min-height:43px;
    border-radius:11px;
    padding:10px 17px;
    border:1px solid #43516d;
    cursor:pointer;
    font-size:.78rem;
    font-weight:900;
    letter-spacing:.02em;
    transition:transform .12s ease,filter .12s ease,border-color .12s ease,opacity .12s ease;
}

.btn:hover:not(:disabled){
    filter:brightness(1.08);
    border-color:#71809d;
}

.btn:active:not(:disabled){
    transform:translateY(1px);
}

.btn.primary{
    color:#081020;
    background:#70a8ff;
    border-color:#dce9ff;
}

.btn.secondary{
    color:#e8eefb;
    background:#1a2438;
}

.btn:disabled{
    opacity:.38;
    cursor:not-allowed;
}

.panels{
    display:grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap:20px;
    padding:18px;
}

.panel{min-width:0}

.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:8px;
}

.panel-head h3{
    margin:0;
    font-size:1.02rem;
}

.panel-head span{
    color:#aab6cc;
    font-size:.72rem;
    white-space:nowrap;
}

.editor,.clean-output{
    display:block;
    width:100%;
    height:560px;
    min-height:420px;
    overflow:auto;
    resize:vertical;
    padding:18px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--panel);
    color:#eef3ff;
    outline:none;
    line-height:1.58;
    font-size:15px;
}

.editor{
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}

.editor:focus,.clean-output:focus{
    border-color:#5e80b5;
    box-shadow:0 0 0 2px rgba(112,168,255,.08);
}

.editor:empty::before{
    content:attr(data-placeholder);
    color:#697792;
    pointer-events:none;
}

.editor a{color:#70a8ff}

.clean-output{resize:vertical}

.status{
    min-height:25px;
    padding:0 18px 16px;
    color:#9eb1d0;
    font-size:.78rem;
}

.status.error{color:#ff9d9d}
.status.success{color:#9ee5bd}

footer{
    padding:18px 4px 0;
    color:#71809b;
    font-size:.68rem;
    line-height:1.5;
    text-align:center;
}

.limit-note{
    display:block;
    margin-top:7px;
    color:#53617a;
    font-size:.58rem;
    letter-spacing:.12em;
}

@media(max-width:820px){
    .app{
        width:min(94vw,680px);
        padding-top:24px;
    }

    .toolbar{
        justify-content:stretch;
    }

    .actions{
        width:100%;
        flex-wrap:wrap;
    }

    .btn.primary{flex:1}

    .panels{
        grid-template-columns:1fr;
    }

    .editor,.clean-output{
        height:440px;
        min-height:320px;
    }
}

@media(max-width:520px){
    .actions{
        flex-direction:column;
        align-items:stretch;
    }

    .btn{width:100%}

    .panels{padding:13px}

    .editor,.clean-output{padding:14px}
}

.modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:24px}.modal.is-open{display:flex}.modal-backdrop{position:absolute;inset:0;background:rgba(3,8,18,.78);backdrop-filter:blur(7px)}.modal-card{position:relative;z-index:1;width:min(680px,100%);max-height:min(86vh,760px);overflow:auto;padding:34px;border:1px solid var(--border);border-radius:18px;background:var(--card);box-shadow:0 24px 80px rgba(0,0,0,.45)}.modal-eyebrow{margin:0 0 8px;font-size:11px;letter-spacing:.16em;font-weight:700;opacity:.65}.modal-card h2{margin:0;font-size:30px;line-height:1.1}.modal-summary{margin:10px 0 24px;font-size:17px;opacity:.78}.modal-summary strong{font-size:28px;opacity:1}.modal-close{position:absolute;top:12px;right:16px;border:0;background:transparent;color:inherit;font-size:30px;line-height:1;cursor:pointer;opacity:.65}.modal-close:hover{opacity:1}.clean-report{display:grid;gap:10px;margin-bottom:26px}.clean-report-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid var(--border);font-size:14px}.clean-report-label{display:flex;gap:9px;line-height:1.35}.clean-report-check{font-weight:800}.clean-report-count{flex:0 0 auto;font-weight:700;opacity:.72;white-space:nowrap}.modal-copy{width:100%}@media(max-width:700px){.modal{padding:14px}.modal-card{padding:28px 20px}.modal-card h2{font-size:25px}.clean-report-row{font-size:13px;gap:12px}}


.hero-row{display:flex;align-items:center;justify-content:space-between;gap:20px}.language-switcher{display:flex;align-items:center;gap:9px}.lang{padding:0;border:0;background:transparent;color:#697792;font-size:.72rem;font-weight:800;letter-spacing:.04em;cursor:pointer}.lang:hover,.lang.active{color:#eef3ff}.lang.active{font-weight:900}.hero-row .eyebrow{margin:0}@media(max-width:520px){.hero-row{align-items:flex-start}.language-switcher{gap:7px}.lang{font-size:.68rem}}
