@font-face{font-family:Inter;font-weight:400;font-display:swap;src:url(fonts/inter-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Inter;font-weight:500;font-display:swap;src:url(fonts/inter-latin-500-normal.woff2) format("woff2")}
@font-face{font-family:Inter;font-weight:600;font-display:swap;src:url(fonts/inter-latin-600-normal.woff2) format("woff2")}
@font-face{font-family:Roboto;font-weight:400;font-display:swap;src:url(fonts/roboto-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Roboto;font-weight:500;font-display:swap;src:url(fonts/roboto-latin-500-normal.woff2) format("woff2")}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{font-family:Roboto,system-ui,-apple-system,sans-serif;background:#f4f5f7;color:#222;overflow:hidden;-webkit-font-smoothing:antialiased}
button{font:inherit;border:0;background:none;cursor:pointer;color:inherit}
[hidden]{display:none!important}

/* ---------- the company behind the glass ---------- */
#site{position:fixed;inset:0;font-family:Inter,system-ui,sans-serif;filter:blur(6px) saturate(.9);transform:scale(1.03);pointer-events:none;user-select:none;transition:filter 1.2s}
#site nav{height:76px;display:flex;align-items:center;padding:0 6vw;gap:44px;background:#fff;border-bottom:1px solid #e6e8ec;font-size:15px;color:#4a5160}
#site nav b{font-size:21px;color:#141821;margin-right:auto;letter-spacing:-.02em}
#site .pill{background:#2e5bff;color:#fff;padding:12px 22px;border-radius:8px}
#site .hero{padding:13vh 6vw 0;display:grid;grid-template-columns:1.1fr 1fr;gap:60px}
#site h2{font-size:clamp(48px,6vw,92px);line-height:1.02;letter-spacing:-.035em;color:#141821;font-weight:600}
#site .hero p{font-size:20px;color:#5a6272;margin:28px 0 36px;line-height:1.5;max-width:560px}
#site .cta{display:inline-block;background:#2e5bff;color:#fff;padding:18px 30px;border-radius:10px;font-weight:500}
#site .art{height:44vh;border-radius:24px;background:linear-gradient(135deg,#dfe6ff,#f7e9ff 60%,#fff1e4)}
#site .logos{display:flex;gap:70px;padding:8vh 6vw;color:#a3a9b6;font-weight:600;font-size:22px}
#veil{position:fixed;inset:0;background:rgba(20,24,33,.38)}

/* ---------- layout ---------- */
#app{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;padding:max(20px,env(safe-area-inset-top)) 16px max(20px,env(safe-area-inset-bottom))}
.card{background:#fff;border-radius:3px;box-shadow:0 2px 6px rgba(0,0,0,.18),0 30px 80px rgba(0,0,0,.28)}
.attempt{font-family:Inter,sans-serif;font-size:13px;letter-spacing:.08em;color:rgba(255,255,255,.88);min-height:16px}
.credit{position:fixed;right:10px;bottom:max(6px,env(safe-area-inset-bottom));font:11px Inter,sans-serif;color:rgba(255,255,255,.45)}
.credit a{color:inherit}

/* ---------- checkbox anchor ---------- */
.anchor{width:304px;height:78px;display:flex;align-items:center;padding:0 12px 0 14px;gap:12px;border:1px solid #d3d3d3;box-shadow:0 2px 6px rgba(0,0,0,.18)}
.box{position:relative;width:28px;height:28px;border:2px solid #c1c1c1;border-radius:2px;background:#fff;flex:none;transition:border-color .2s}
.box:hover{border-color:#b2b2b2}
.box:focus-visible{outline:2px solid #3a6fd9;outline-offset:2px}
.box .spin{position:absolute;inset:-4px;border-radius:50%;border:3px solid #3a6fd9;border-right-color:transparent;border-bottom-color:transparent;opacity:0}
.anchor.loading .box{border-color:transparent}
.anchor.loading .spin{opacity:1;animation:rot 1s linear infinite}
.box .tick{position:absolute;inset:-6px;width:40px;height:40px;fill:none;stroke:#1e8e3e;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:30;stroke-dashoffset:30;opacity:0}
.anchor.done .box{border-color:transparent}
.anchor.done .tick{opacity:1;animation:draw .5s .1s ease forwards}
@keyframes rot{to{transform:rotate(360deg)}}
@keyframes draw{to{stroke-dashoffset:0}}
.label{font-size:14px;color:#222;flex:1}
.brand{font-size:10px;color:#555;text-align:center;line-height:1.3;display:flex;flex-direction:column;align-items:center}
.brand small{font-size:8px;color:#8a8e94;white-space:nowrap}
.brand .mark{width:22px;height:22px;border-radius:50%;border:2px solid #3a6fd9;border-left-color:#8fb0ee;margin-bottom:3px;position:relative}
.brand .mark:after{content:"";position:absolute;inset:5px;border-radius:50%;background:#3a6fd9}

/* ---------- grid challenge ---------- */
.challenge{max-width:100%}
.head{background:#3a6fd9;color:#fff;padding:20px 22px 22px;margin:7px;border-radius:2px}
.head small{font-size:14px;opacity:.95}
.head strong{display:block;font-size:26px;font-weight:500;line-height:1.15;margin:4px 0 6px}
.head em{font-style:normal;font-size:13px;opacity:.92;display:block;line-height:1.35}
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin:0 7px}
.tile{position:relative;aspect-ratio:1;overflow:hidden;cursor:pointer;background:#e8eefc}
.tile .bg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;transition:transform .15s ease}
.tile img{width:58%;height:58%;filter:drop-shadow(0 3px 4px rgba(0,0,0,.13));pointer-events:none;user-select:none;-webkit-user-drag:none}
.tile.sel .bg{transform:scale(.84)}
.tile:after{content:"";position:absolute;left:4px;top:4px;width:24px;height:24px;border-radius:50%;background:#3a6fd9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;opacity:0;transform:scale(.4);transition:all .15s}
.tile.sel:after{opacity:1;transform:none}
.tiles.swap .tile .bg{animation:fadein .4s ease both}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.msg{color:#d93025;font-size:13.5px;line-height:1.4;padding:10px 16px 0;min-height:10px}
.msg:empty{padding-top:0}
.msg.info{color:#555}
.bar{display:flex;align-items:center;gap:6px;padding:10px 7px 7px 10px;border-top:1px solid #e3e3e3;margin-top:12px}
.ic{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.ic:hover{background:#f1f1f1}
.ic svg{width:22px;height:22px;fill:none;stroke:#6b6f75;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.brand.mini{margin-left:auto;margin-right:10px;text-align:right;align-items:flex-end}
.verify{background:#3a6fd9;color:#fff;font-weight:500;font-size:14px;letter-spacing:.04em;padding:11px 22px;border-radius:2px;min-width:96px}
.verify:hover{background:#3466cc}
.verify[disabled]{opacity:.75;cursor:default}
.verify.busy{color:transparent;position:relative}
.verify.busy:after{content:"";position:absolute;left:50%;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;border:2px solid #fff;border-right-color:transparent;border-radius:50%;animation:rot .8s linear infinite}

/* ---------- pass ---------- */
.passed{width:304px;padding:30px 20px;text-align:center}
.passed svg{width:64px;height:64px;fill:none;stroke:#1e8e3e;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.passed circle{stroke-dasharray:151;stroke-dashoffset:151;animation:draw .7s ease forwards}
.passed path{stroke-dasharray:40;stroke-dashoffset:40;animation:draw .4s .6s ease forwards}
.passed p{margin-top:12px;font-size:16px;color:#1e8e3e;opacity:0;animation:fadein .5s 1s forwards}

/* ---------- phone ---------- */
body.phone{background:#f4f4f2}
body.phone #site,body.phone #veil{display:none}
body.phone #app{justify-content:flex-start;padding-top:max(14vh,env(safe-area-inset-top))}
body.phone .card{box-shadow:0 4px 16px rgba(0,0,0,.08);border:1px solid #dcdcdc;border-radius:4px}
body.phone .anchor{order:2;width:100%;max-width:400px;height:auto;padding:16px}
body.phone .attempt{order:3;color:#8a8e94}
body.phone .credit{color:#b0b3b8}
body.phone .challenge{order:1}
.wtitle{padding:20px 20px 4px;font-size:15px;color:#333}
.wimg{margin:12px 20px;height:120px;border:1px solid #e4e4e4;background:repeating-linear-gradient(115deg,#f3f0e8 0 6px,#ece7dc 6px 12px);overflow:hidden}
.wimg svg{width:100%;height:100%}
#winput{display:block;width:calc(100% - 40px);margin:6px 20px 0;height:48px;border:1px solid #c7c7c7;border-radius:3px;padding:0 14px;font:16px Roboto,system-ui,sans-serif;color:#111;outline:none;-webkit-appearance:none}
#winput:focus{border-color:#3a6fd9}
#winput.bad{border-color:#d93025}
#word .msg{padding:10px 20px 0}
#word .bar{border-top:0;margin-top:6px;padding:12px 20px 20px 14px}
#word .verify{margin-left:auto;padding:12px 24px}

/* ---------- grid on small screens ---------- */
.challenge{width:min(400px,calc(100vw - 24px))}
@media (max-width:699px){
  body:not(.phone) #site nav{height:60px;padding:0 20px;gap:0}
  body:not(.phone) #site nav span{display:none}
  body:not(.phone) #site nav .pill{display:inline;padding:9px 14px;font-size:13px}
  body:not(.phone) #site nav b{font-size:17px}
  body:not(.phone) #site .hero{grid-template-columns:1fr;padding:9vh 20px 0;gap:28px}
  body:not(.phone) #site h2{font-size:46px}
  body:not(.phone) #site .hero p{font-size:16px;margin:18px 0 24px}
  body:not(.phone) #site .art{height:26vh}
  body:not(.phone) #site .logos{flex-wrap:wrap;gap:16px 30px;padding:6vh 20px;font-size:17px}
  body:not(.phone) #app{gap:14px;padding-left:12px;padding-right:12px;justify-content:flex-start;overflow-y:auto;-webkit-overflow-scrolling:touch}
  body:not(.phone) #app>:not([hidden]):first-child,body:not(.phone) #anchor:not([hidden]),body:not(.phone) #grid:not([hidden]),body:not(.phone) #passed:not([hidden]){margin-top:auto}
  body:not(.phone) #attempt{margin-bottom:auto}
  body:not(.phone) .challenge{width:min(400px,calc(100vw - 24px),calc(100vh - 265px));width:min(400px,calc(100vw - 24px),calc(100dvh - 265px));min-width:280px}
  body:not(.phone) .head{padding:14px 16px 16px}
  body:not(.phone) .head strong{font-size:22px}
  body:not(.phone) .bar{padding:8px 6px 6px 6px;gap:2px}
  body:not(.phone) .brand.mini{margin-right:6px}
  body:not(.phone) .verify{padding:11px 16px;min-width:84px}
  .credit{font-size:10px}
}
@media (max-width:359px){body:not(.phone) .brand.mini{display:none}body:not(.phone) .verify{margin-left:auto}}
/* phone held sideways: prompt on the left, tiles on the right */
@media (max-height:500px) and (orientation:landscape){
  body:not(.phone) #app{gap:8px;padding-top:max(8px,env(safe-area-inset-top));padding-bottom:max(8px,env(safe-area-inset-bottom))}
  body:not(.phone) .challenge{display:grid;grid-template-columns:minmax(200px,260px) auto;grid-template-rows:1fr auto auto;width:auto;min-width:0}
  body:not(.phone) .head{grid-column:1;grid-row:1 / 3;align-self:start;margin:7px 0 7px 7px}
  body:not(.phone) .head strong{font-size:21px}
  body:not(.phone) .tiles{grid-column:2;grid-row:1;margin:7px 7px 0;width:calc(100vh - 165px);width:calc(100dvh - 165px);max-width:330px}
  body:not(.phone) .msg{grid-column:2;grid-row:2;max-width:calc(100dvh - 151px);padding:6px 10px 0}
  body:not(.phone) .bar{grid-column:1 / 3;grid-row:3;margin-top:4px}
  body:not(.phone) .attempt{font-size:11px;min-height:12px}
  .credit{display:none}
}
@media (max-height:640px) and (min-width:700px){body:not(.phone) #app{justify-content:flex-start;overflow:auto;padding-top:16px}}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01s!important;transition-duration:.01s!important}.anchor.loading .spin{animation:rot 1.6s linear infinite!important}}
