[hidden] { display: none !important; }
body.app { background: var(--soft); }
.app-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--teal-dark); background: #e2f4f2; border-radius: 4px; padding: 3px 8px; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--teal-dark); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.small { font-size: 13.5px; }
header.top .linkbtn.navlink, header.top .lang.linkbtn { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 14.5px; }
.app-main { max-width: 1180px; margin: 0 auto; padding: 22px 24px 80px; }
.device-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--teal-dark); background: #fff; border: 1px solid #cdeae7; border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.device-note svg { width: 16px; height: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 34px 36px; }
.step h1 { font-size: 28px; color: var(--navy); margin: 0 0 6px; font-weight: 600; }
.sub-left { color: var(--muted); margin: 0 0 24px; max-width: 700px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #b8d9d6; border-radius: 16px; padding: 42px 20px; text-align: center; cursor: pointer; background: #f7fbfb; transition: background .15s, border-color .15s; }
.drop:hover, .drop.over { background: #ecf7f6; border-color: var(--teal); }
.drop svg { width: 48px; height: 48px; margin-bottom: 6px; }
.drop strong { color: var(--navy); font-size: 17px; }
.drop span { color: var(--muted); font-size: 14px; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 22px 0 10px; }
textarea#pasteIn { width: 100%; border: 1px solid #cfd8e3; border-radius: 10px; padding: 12px 14px; font: 14px/1.6 "Poppins", system-ui, sans-serif; resize: vertical; }
.row-end { display: flex; justify-content: flex-end; margin-top: 14px; }
.progress { margin-top: 18px; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.progress .bar { flex: 1; height: 8px; background: #e6edf2; border-radius: 99px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.err { color: #a3261d; font-size: 14px; min-height: 1em; }
.ok { color: var(--teal-dark); font-size: 14px; min-height: 1em; }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.review-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.meta { color: var(--muted); font-size: 13.5px; margin: 0; }
.hint { color: var(--muted); font-size: 14px; margin: 14px 0 16px; }
.review-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; max-height: 68vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14.5px/1.75 "Poppins", system-ui, sans-serif; background: #fff; }
.doc .pg { display: block; text-align: center; font-size: 11.5px; color: #9aa5b1; letter-spacing: .5px; margin: 14px 0; border-top: 1px dashed #dfe5ec; padding-top: 6px; }
mark.pii { background: #0b1f3a; color: #fff; border-radius: 4px; padding: 1px 4px; cursor: pointer; }
mark.pii.check { background: #f2b84b; color: #1d2633; }
mark.pii.off { background: transparent; color: var(--ink); box-shadow: inset 0 -2px 0 #c7d0da; }
mark.pii:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.side { position: sticky; top: 90px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; max-height: 70vh; overflow: auto; }
.side h2 { font-size: 15px; margin: 0 0 12px; color: var(--navy); }
.grp { border-top: 1px solid var(--line); padding: 10px 0; }
.grp:first-child { border-top: 0; padding-top: 0; }
.grp-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.grp-head .n { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.grp ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 26px; }
.grp li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.grp li .lbl { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.grp li .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.grp li.check .v::after { content: " ?"; color: #c98a14; font-weight: 700; }
.sel-pop { position: absolute; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(11,31,58,.18); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; flex-wrap: wrap; max-width: 520px; }
.sel-pop[hidden] { display: none; }
.sel-pop select, .rule-add select { font: inherit; font-size: 13.5px; border: 1px solid #cfd8e3; border-radius: 8px; padding: 5px 8px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.warn-box { display: flex; flex-direction: column; gap: 4px; background: #fff8ea; border: 1px solid #f2d9a6; border-radius: 12px; padding: 14px 16px; margin: 16px 0; font-size: 14px; }
.warn-box.done { background: #eaf7f5; border-color: #bfe5e1; }
pre.clean { border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; max-height: 58vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 14.5px/1.75 "Poppins", system-ui, sans-serif; background: #fbfcfd; margin: 0; }
.out-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.modal { position: fixed; inset: 0; background: rgba(11,31,58,.45); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow: auto; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; padding: 26px 28px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; color: var(--navy); font-size: 22px; }
.x { background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal h3 { font-size: 15px; color: var(--navy); margin: 22px 0 8px; }
.rule-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rule-add input[type=text] { flex: 1; min-width: 180px; font: inherit; font-size: 14px; border: 1px solid #cfd8e3; border-radius: 8px; padding: 7px 10px; }
.rule-list { list-style: none; padding: 0; margin: 10px 0 0; }
.rule-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; }
.rule-list li .t { flex: 1; overflow-wrap: anywhere; }
.rule-list li .k { font-size: 11.5px; color: var(--muted); }
.rule-list li button { background: none; border: 0; color: #a3261d; cursor: pointer; font-size: 13px; }
.rule-list .empty { color: var(--muted); border: 0; padding: 0; }
.rule-io { display: flex; gap: 18px; margin-top: 22px; }
@media (max-width: 900px) {
  .review-grid { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .step { padding: 24px 18px; }
}
@media (max-width: 1020px) {
  body.app header.top .right .navlink, body.app header.top .lang { display: inline-flex; }
  body.app .app-badge { display: none; }
}
body.preview-only #cleanView { -webkit-user-select: none; user-select: none; white-space: normal; }
body.preview-only #cleanView canvas.pv { display: block; pointer-events: none; }
.pv-box { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; width: 100%; background: #eaf7f5; border: 1px solid #bfe5e1; border-radius: 12px; padding: 16px 18px; font-size: 14.5px; }
.pv-box .btn { margin-top: 6px; }
@media print { body.preview-only * { visibility: hidden !important; } }