:root{color-scheme:light;--bg:#f5f7f2;--paper:#fff;--ink:#17312e;--muted:#6b7b73;--line:#dfe6dd;--dark:#123c33;--soft:#edf3e8;--accent:#cce88a}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer}
button:disabled{cursor:wait;opacity:.65}
button:focus-visible,a:focus-visible{outline:3px solid #9ab854;outline-offset:5px}
.connect-header{max-width:1120px;margin:auto;min-height:82px;padding:20px 34px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:750}
.brand img{border-radius:10px}
.back-link{font-size:13px;color:#52675c}
.back-link span{margin-left:9px}
.connect-main{max-width:1040px;margin:0 auto;padding:35px 34px 50px}
.connect-intro{text-align:center;margin-bottom:30px}
.eyebrow{margin:0 0 14px;color:#748464;font-size:10px;font-weight:750;letter-spacing:2.5px}
h1{font-size:clamp(34px,4.4vw,54px);letter-spacing:-2px;line-height:1.2;margin:0 0 15px}
.lead{margin:0;color:var(--muted);font-size:16px;line-height:1.8}
.pair-stage{border:1px solid var(--line);background:var(--paper);border-radius:26px;padding:24px 30px 20px;box-shadow:0 12px 40px #123c3305}
.pair-stage-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.pair-stage-head h2{font-size:17px;letter-spacing:-.4px;margin:0;font-weight:700}
.state-pill{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;background:#f2f5ee;border:1px solid #e4eadf;border-radius:999px;padding:7px 11px;color:#63735c;font-size:11px}
.state-dot{width:6px;height:6px;border-radius:50%;background:#82947b}
.state-pill[data-state="ready"],.state-pill[data-state="approved"]{background:#eef6e9;color:#35613d;border-color:#dcebd4}
.state-pill[data-state="ready"] .state-dot,.state-pill[data-state="approved"] .state-dot{background:#5b913f;box-shadow:0 0 0 3px #5b913f15}
.state-pill[data-state="pending"]{color:#90620b;background:#fff7e7;border-color:#eedbb2}
.state-pill[data-state="pending"] .state-dot{background:#b9821f}
.qr-frame{display:grid;place-items:center;width:300px;min-height:300px;margin:0 auto;padding:18px;background:#fff;border:1px solid #dce6d7;border-radius:18px;box-shadow:0 0 0 7px #f6f8f2}
.qr-frame img{display:block;width:264px;height:264px;max-width:100%;image-rendering:pixelated}
.qr-placeholder{text-align:center;padding:20px;color:var(--muted)}
.qr-placeholder-icon{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 21px;border:1px dashed #b5c5aa;border-radius:14px;color:#8b9a80;font-size:28px;font-weight:300}
.qr-placeholder strong{font-size:15px;color:#53694f}
.qr-placeholder p{font-size:12px;line-height:1.8;margin:11px 0 0}
.qr-help{text-align:center;font-size:14px;line-height:1.7;margin:21px 0 5px}
.pair-expiry{text-align:center;font-size:11px;color:var(--muted);margin:0;line-height:1.7}
.qr-actions{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:8px;min-height:34px}
.text-button{padding:9px 12px;color:#44633f;border:0;background:transparent;font-size:12px;font-weight:650;min-height:36px;border-radius:8px}
.text-button:hover{background:#f1f5ec}
.text-button span{margin-left:7px}
.connection-status{text-align:center;font-size:12px;color:var(--muted);line-height:1.8;margin:5px 0 0;min-height:20px}
.connection-status:empty{min-height:0;margin:0}
.connection-flow{margin-top:30px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.section-heading h2{margin:0;font-size:17px;letter-spacing:-.3px}
.section-heading p{margin:0;color:var(--muted);font-size:12px}
.flow-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;list-style:none;padding:0;margin:0}
.flow-step{position:relative;min-height:168px;padding:21px 20px 18px;border:1px solid var(--line);border-radius:16px;background:#fff}
.flow-step:not(:last-child)::after{content:"→";position:absolute;right:-23px;top:50%;transform:translateY(-50%);font-size:21px;color:#7f9271}
.step-number{display:grid;place-items:center;width:30px;height:30px;border:1px solid #d9e4cf;border-radius:9px;color:#546f3f;background:#f3f7ed;font-size:11px;font-weight:750;letter-spacing:.5px}
.flow-step h3{margin:14px 0 7px;font-size:17px;letter-spacing:-.4px}
.flow-step p{margin:0;color:var(--muted);font-size:12px;line-height:1.9}
.flow-scan{margin-top:12px;padding:10px 14px;background:var(--dark);color:white;border:0;border-radius:9px}
.download-actions{display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;margin-top:28px}
.download-button{display:flex;align-items:center;justify-content:space-between;gap:35px;min-height:52px;min-width:255px;padding:16px 20px;border-radius:12px;background:var(--dark);color:white;font-size:14px;font-weight:700}
.download-button:hover{background:#1e4e41}
.download-actions>span{font-size:12px;color:var(--muted)}
.security-note{display:flex;align-items:flex-start;justify-content:center;gap:9px;max-width:740px;margin:22px auto 0;font-size:11px;line-height:1.9;color:#6d7b6e;text-align:left}
footer{max-width:1040px;margin:auto;border-top:1px solid var(--line);padding:22px 34px;display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#82907f}
.paired-section{margin-top:26px;padding:20px 22px;background:#edf2e8;border:1px solid #dfe7d8;border-radius:16px}
.paired-section h2{font-size:15px}
.device-count{font-size:11px;color:var(--muted)}
.device{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 0;border-top:1px solid #dae3d1}
.device-copy{min-width:0}
.device-copy strong{display:block;font-size:14px;overflow-wrap:anywhere}
.device-copy small{display:block;font-size:11px;line-height:1.8;color:var(--muted);margin-top:4px;overflow-wrap:anywhere}
.revoke-button,.reject-button{flex:none;color:#5c7060;padding:9px 12px;border:0;background:transparent;border-radius:8px;min-height:40px;font-size:12px}
.empty-devices{margin:0;font-size:12px;line-height:1.8;color:var(--muted)}
.pair-request{max-width:620px;padding:22px;margin:0 auto 24px;background:#eef6e8;border:2px solid #659343;border-radius:18px;text-align:center}
.pair-request h3{font-size:23px;margin:0 0 8px}
.pair-request p{font-size:13px;color:#526a44;line-height:1.8;margin:0 0 15px}
.pair-allow{display:block;width:100%;min-height:96px;border:3px solid #05462e;border-radius:16px;background:#087846;color:#fff;font-size:18px;font-weight:850;box-shadow:0 6px 0 #05462e}
.pair-allow:hover{background:#055c3b}
.pair-allow:focus-visible{outline:4px solid #ca8700;outline-offset:5px}
.reject-button{margin-top:12px}
@media(max-width:680px){.connect-header{min-height:70px;padding:17px 20px}.brand{font-size:16px}.brand img{width:29px;height:29px}.back-link{font-size:11px}.connect-main{padding:24px 18px 34px}h1{font-size:35px;letter-spacing:-1.5px}.lead{font-size:13px;max-width:290px;margin:auto}.connect-intro{margin-bottom:24px}.pair-stage{padding:20px 16px 16px;border-radius:20px}.pair-stage-head{justify-content:center;flex-wrap:wrap;gap:10px;margin-bottom:22px}.pair-stage-head h2{font-size:15px}.qr-frame{width:min(280px,100%);min-height:260px;padding:14px}.qr-frame img{width:248px;height:auto}.qr-help{font-size:12px}.section-heading{align-items:flex-start;gap:6px}.section-heading h2{font-size:16px}.section-heading p{font-size:11px}.flow-steps{grid-template-columns:1fr;gap:25px}.flow-step{min-height:115px;padding:19px 19px 19px 65px}.step-number{position:absolute;top:22px;left:20px}.flow-step h3{margin:3px 0 7px;font-size:16px}.flow-step:not(:last-child)::after{content:"↓";left:50%;right:auto;top:auto;bottom:-25px;transform:translateX(-50%);line-height:25px;font-size:19px}.download-actions{flex-direction:column;gap:12px}.download-button{width:100%}.paired-section{padding:18px 16px}.pair-request{padding:17px 13px}.pair-request h3{font-size:20px}.pair-allow{font-size:18px}footer{padding:20px;flex-wrap:wrap}.security-note{font-size:10px}}
.mobile-connect{max-width:520px;margin:0 auto;padding:30px 22px 32px}.mobile-intro{text-align:center;margin:4px 0 26px}.mobile-intro h1{font-size:30px;letter-spacing:-.8px}.mobile-intro>p:last-child{font-size:14px;line-height:1.85;color:var(--muted);margin:0}.mobile-scan-card{padding:27px 22px 19px;border:1px solid var(--line);border-radius:24px;background:var(--paper);text-align:center;box-shadow:0 12px 36px #17312e07}.scan-symbol{width:100px;height:100px;margin:0 auto 19px;padding:17px;color:var(--dark);background:var(--soft);border-radius:26px}.scan-symbol svg{width:100%;height:100%}.mobile-scan-card h2{font-size:20px;margin:0 0 9px}.mobile-scan-card>p:first-of-type{font-size:13px;color:var(--muted);line-height:1.7;margin:0 0 23px}.mobile-scan-button{width:100%;min-height:56px;border:0;border-radius:14px;background:var(--dark);color:#fff;font-size:17px;font-weight:700}.mobile-status{font-size:12px;line-height:1.7;color:var(--muted);margin:15px 0 0;min-height:21px}.mobile-steps{list-style:none;margin:27px 0 20px;padding:0}.mobile-steps li{position:relative;display:flex;gap:14px;padding:0 3px 23px}.mobile-steps li:not(:last-child):after{content:"";position:absolute;left:17px;top:32px;bottom:5px;width:1px;background:var(--line)}.mobile-steps li>span{display:grid;place-items:center;flex:none;width:29px;height:29px;border:1px solid #cbd8c5;border-radius:50%;font-size:12px;font-weight:700;color:var(--dark);background:var(--soft)}.mobile-steps strong{display:block;font-size:14px;line-height:29px}.mobile-steps p{margin:3px 0 0;font-size:12px;line-height:1.7;color:var(--muted)}.mobile-security{text-align:center;font-size:11px;color:var(--muted);line-height:1.7;margin:0}.mobile-connect~footer{font-size:10px}
