*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{overflow-x:hidden}
body{font-family:'Helvetica Neue',Arial,sans-serif;background:#f8f9fa;color:#1a1a1a;overflow-x:hidden;min-height:100vh}
img{max-width:100%;height:auto}
h1,h2,h3,h4,p,div{overflow-wrap:break-word;word-break:break-word}
.slc-container{max-width:960px;margin:0 auto;padding:40px 20px}
.slc-header{text-align:center;margin-bottom:32px}
.slc-header h1{font-family:Georgia,'Times New Roman',serif;font-size:1.8rem;color:#1a1a2e;margin-bottom:8px}
.slc-header h1 span{color:#e94560}
.slc-header .subtitle{color:#666;font-size:.95rem}
.card{background:#fff;border:1px solid #e0e0e0;border-radius:8px;padding:24px;margin-bottom:20px;box-shadow:0 1px 6px rgba(0,0,0,.04)}
.card h2{font-size:1.1rem;color:#1a1a1a;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #e94560}
.upload-form{margin-top:16px}
.file-input-wrap{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:20px;background:#f8f9fa;border:2px dashed #d0d0d0;border-radius:8px}
.file-input-wrap input[type="file"]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.file-label{display:inline-block;padding:8px 20px;background:#fff;color:#1a1a1a;border:1px solid #ccc;border-radius:4px;cursor:pointer;font-size:.9rem;transition:background .2s}
.file-label:hover{background:#f0f0f0}
#file-name{color:#888;font-size:.85rem}
.btn{display:inline-block;padding:10px 28px;background:#e94560;color:#fff;border:none;border-radius:4px;font-size:.95rem;font-weight:600;cursor:pointer;text-decoration:none;transition:background .2s}
.btn:hover{background:#d63850}
.btn-small{display:inline-block;padding:6px 16px;background:#e94560;color:#fff;border:none;border-radius:4px;font-size:.8rem;font-weight:600;cursor:pointer;text-decoration:none;transition:background .2s}
.btn-small:hover{background:#d63850}
.btn-secondary{background:#6c757d}
.btn-secondary:hover{background:#5a6268}
.law-list{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:8px;margin:16px 0}
.law-list li{padding:8px 14px;background:#f8f9fa;border:1px solid #e8e8e8;border-radius:4px;font-size:.85rem;color:#555}
.law-list li::before{content:"\2696";margin-right:8px;color:#e94560}
.steps{list-style:decimal;padding-left:20px;color:#333;line-height:1.8}
.steps li{margin-bottom:4px}
.steps li strong{color:#1a1a2e}
.scan-table{width:100%;border-collapse:collapse;font-size:.9rem}
.scan-table th{text-align:left;padding:10px 12px;border-bottom:2px solid #e0e0e0;color:#888;font-weight:700;text-transform:uppercase;font-size:.72rem;letter-spacing:.5px}
.scan-table td{padding:10px 12px;border-bottom:1px solid #eee}
.scan-table tr:hover td{background:#fef2f3}
.scan-table a{color:#e94560;text-decoration:none;font-weight:600}
.scan-table a:hover{text-decoration:underline}
.empty{color:#888;font-style:italic}
.error{color:#dc3545}
.error-card .error{color:#dc3545;margin-bottom:12px;font-weight:600}
.back-link{margin-bottom:20px}
.scan-info{background:#f8f9fa;border:1px solid #e8e8e8}
.info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.info-grid div{color:#555;font-size:.9rem}
.info-grid strong{color:#1a1a1a}
.overall-card h2{font-size:1.2rem;margin-bottom:4px;border-bottom:none;padding-bottom:0}
.overall-card p{margin-top:8px;color:#555}
.warning-text{color:#dc3545;font-weight:600}
.result-header{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.law-number{background:#1a1a2e;color:#fff;border-radius:50%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.8rem;flex-shrink:0}
.result-header h3{flex:1;font-size:1rem;color:#1a1a1a}
.risk-badge{padding:3px 10px;border-radius:12px;color:#fff;font-size:.7rem;font-weight:700;letter-spacing:.5px;text-transform:uppercase}
.risk-score{color:#888;font-size:.85rem;font-weight:600}
.result-body p{color:#555;font-size:.9rem;line-height:1.6}
.flagged{margin-top:12px;padding:12px 16px;background:#f8f9fa;border-radius:4px;border-left:3px solid #e94560}
.flagged pre{margin-top:8px;padding:8px 12px;background:#fff;border:1px solid #e8e8e8;border-radius:4px;font-size:.8rem;color:#555;overflow-x:auto;white-space:pre-wrap;word-break:break-word}
.section-title{font-family:Georgia,'Times New Roman',serif;font-size:1.15rem;font-weight:700;border-bottom:3px solid #e94560;padding-bottom:8px;margin-bottom:24px;color:#1a1a1a}
.flash{padding:10px 14px;border-radius:4px;margin-bottom:16px;font-size:.85rem}
.flash-success{background:#d4edda;color:#155724;border:1px solid #c3e6cb}
.flash-error{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb}
.error-box{background:#fce4e4;border-left:4px solid #e94560;padding:14px 18px;border-radius:4px;color:#800;margin-bottom:24px}
@media(max-width:600px){.slc-container{padding:20px 12px}.slc-header h1{font-size:1.4rem}.law-list{grid-template-columns:1fr}.file-input-wrap{flex-direction:column;align-items:stretch}}

/* --- UK Speech Law Reference Section --- */
.ref-card .ref-card-desc{color:#555;line-height:1.5;margin-bottom:20px;font-size:.92rem}
.ref-list{display:flex;flex-direction:column;gap:8px}
.ref-item{border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;background:#fff;transition:box-shadow .2s}
.ref-item:hover{border-color:#d0d0d0;box-shadow:0 2px 8px rgba(233,69,96,.08)}
.ref-item[open]{border-color:#e94560;box-shadow:0 2px 12px rgba(233,69,96,.12)}
.ref-item summary{display:flex;align-items:center;gap:14px;padding:14px 18px;cursor:pointer;list-style:none;font-size:.95rem;font-weight:600;color:#1a1a2e;user-select:none;transition:background .2s}
.ref-item summary::-webkit-details-marker{display:none}
.ref-item summary::-moz-list-bullet{list-style:none}
.ref-item summary:hover{background:#fef2f3}
.ref-item[open] summary{background:#fef2f3;border-bottom:1px solid #f0e0e2}
.ref-item summary::after{content:"+";margin-left:auto;font-size:1.1rem;font-weight:700;color:#e94560;transition:transform .25s}
.ref-item[open] summary::after{content:"\2212"}
.ref-num{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;background:#1a1a2e;color:#fff;border-radius:6px;font-size:.75rem;font-weight:700;flex-shrink:0;letter-spacing:0}
.ref-body{padding:16px 18px 20px;animation:ref-fade-in .25s ease-out}
@keyframes ref-fade-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
.ref-body p{color:#444;font-size:.9rem;line-height:1.7;margin-bottom:10px}
.ref-body p:last-child{margin-bottom:0}
.ref-body ul{padding-left:18px;margin:8px 0 12px}
.ref-body ul li{color:#444;font-size:.88rem;line-height:1.7;margin-bottom:4px}
.ref-body ul li strong{color:#1a1a2e}
.ref-source{margin-top:14px;padding-top:10px;border-top:1px solid #eee;font-size:.8rem}
.ref-source a{color:#e94560;text-decoration:none;font-weight:600}
.ref-source a:hover{text-decoration:underline}
@media(max-width:600px){.ref-item summary{padding:12px 14px;font-size:.88rem}.ref-body{padding:12px 14px 16px}}
